Archived topic
Cannot use hooks on blog page
5 replies · Started by Markus on June 10, 2021
Hi,
I'm trying to add a page hero made with Elements/Block to the after_header hook, but I can't get it working. Nothing is displayed no matter what content I add, no matter what hook I use. On the other pages it workt well, but not on the blog page.
For the next test I add the letter "x" with the before_footer hook, so you should see this "x" on the left just before the footer:
Working test page: Contact Us
Not working test page: Blogs
It's the same when adding things with hooks by code in the functions.php file. I really don't know what's going on, do you? :-)
Markus
Hi there,
What display rule are you using for the blog page?
Hi Leo,
I’ve set “Blog” now.
The page you've linked isn't the default blog/posts page - it's a category archive for category Blogs.
So you will need to select Post category archive > Blogs in the display rules.
Oh yes off course.
Problem solved.
Thank you very much Leo!
No problem :)