[Resolved] hook question

Home Forums Support [Resolved] hook question

Home Forums Support hook question

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #463266
    William

    I am currently using a “my custom functions” plugin to add some important code to my site. I would like the code to run every time they load a page. The code adds the free courses to to the user’s available courses. Can I use the hook wp_head to run this code, each page load? I could not get an answer from the plugin owner about when the code is run, and I would like to know for sure that it will be run. Thank you for this awesome site.

    #463364
    Leo
    Staff
    Customer Support

    Hi there,

    The plugin route should be better. This is the one we suggest: https://docs.generatepress.com/article/adding-php/

    Normally you would add the code using a plugin or child theme’s function.php unless the code specifically ask you to insert it in <head>

    #463898
    William

    Great, thanks!

    #463901
    Leo
    Staff
    Customer Support

    No problem!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.