How to get id or title of page set as static home page
-
Hi folks,
I am creating a theme which contains code to be run only if the page is the homepage.
At present, I have a dirty hack which does this:
if (is_home() || is_page('page-title-of-static-homepage') ){ /* run code */
I figure somewhere there must be a function that can retrieve the id or title of the static homepage, or something like is_static_homepage() – but I haven’t found it yet. If I could find this, I could add it as a condition of my if statement, which would allow users to change the title of the static homepage without having to edit the theme code.
Any ideas what this elusive function might be?
Thanks,
Dan
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘How to get id or title of page set as static home page’ is closed to new replies.