Join the Soledad Facebook Users Group here
for Share, assistance, discussion, and Updates related to Soledad WordPress Theme.

If you can't create a new ticket - you can send us an email via our contact form and we will get back to you.

Okay
  Public Ticket #2941748
Action Hooks in the theme
Closed

Comments

  • apratimblog started the conversation

    Hello,


    I want to add some custom functions and widgets to the theme on my website. Is there any way for that like, action hooks? or something that?

  •  2,612
    PenciDesign replied

    Hi,

    For the fastest & safest ways, please put your custom code into the child theme functions.php file or install the Code Snippet then create a new snippet with your custom code.

    Regards,
    PenciDesign.


  • apratimblog replied

    Thanks, Can you send me a list of all hooks available on the Soledad theme.

  •  2,612
    PenciDesign replied

    Hi,

    The best way to find the hook on Soledad or another WordPress theme is installing the Show Hooks plugin here: https://wordpress.org/plugins/show-hooks/

    Regards,
    PenciDesign.


  • apratimblog replied

    Hello,

    I used this plugin but I didn't find/or didn't understand any usable hooks in the Soledad theme.

    Can you check for me and tell me which hook to be used to place a widget/javascript code below the related post grid.

    Thanks

  •  2,612
    PenciDesign replied

    Hi,

    Unfortunately, there is no hook/action available on the recent post grid template.

    You need to copy this file then overwritten to your child theme and put the custom code:

    soledad/inc/templates/related_posts.php

    Regards,
    PenciDesign.


  • apratimblog replied

    Hello,

    I was using a plugin to place an ad widget between the related post and the author box. Please check the attached screenshot.

    But now for some reason, that plugin stopped working. So I was thinking if that could be achieved with hooks. but as you also confirmed there are no hooks available. So can you tell me exactly where I have to place my shortcode or PHP code in the template file to show the widget in that place (check attached screenshot)

    Thanks

  •  2,612
    PenciDesign replied

    Hi,

    Please open the file:

    soledad/inc/templates/related_posts.php

    Then put your ads code at the end of this file.

    Regards,
    PenciDesign.