Site logo

Archived topic

Hook for "All Pages" Not Appearing on Home - by design?

3 replies · Started by David on September 9, 2019

Viewing posts 1–4 of 4

Hi!
I actually solved this, but wanted to report it in case it's helpful.

I set up a hook to display on all pages before the footer. It displayed on every page except for the home page.

It finally dawned on me to try adding another display rule, so I added the Front Page. Then it worked.

I would have thought that "All Pages" would cover, well, all of them including the Front Page. Is this designed to only work on "home" if you add an explicit hook for the Front Page?

Thanks for all your help,
Dave

Hi Dave,

We actually noticed this before - WordPress sometimes does some weird things for home page and index pages.

The display rules are based on WordPress conditional tags:
https://codex.wordpress.org/Conditional_Tags#A_PAGE_Page

Your solution of adding an extra display rule is perfect.

Thanks for sharing your solution :)

Thanks, Leo!
Yeah, as a coder, now and then I run into "front page" vs. "home page" or other fun variants, so I get it.

Maybe it'll be different if I use the root of the site as the blog root, but I actually haven't made a site that does that in a really long time.

Best, Dave

No problem :)

This archived topic is closed to new replies.