I have this simple code below:

function func1() {
echo "this is amazing";


Now, I know that I could use reko_hook(); either inside index.php or page.php where I want, but I was wondering if there are more pre-defined hooks such as ‘init‘.

For example, I could do


but it will echo this is amazing before the header,

The question is, if there are other pre-defined hooks to specify the location of the function output this is amazing to be placed:

  1. After the header, before the Page/Post title.

  2. After the header, after the Page/Post title.

  3. Before Footer.

  4. After the Footer.

Thank you.

Read more here: How to insert a text in all pages and posts before or after specific places?


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: