Site logo

Archived topic

hook question

3 replies · Started by William on January 4, 2018

Viewing posts 1–4 of 4

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.

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>

Great, thanks!

No problem!

This archived topic is closed to new replies.