How to get the title of a page set as the home page from another page?
-
Hi. I have currently set a page as my static home page.
For my header template, I’m looking to get a link to the home page, but I want the link text to be the static page’s title, which is different from the website title. How can I do this?
I’ve seen
<?php echo get_the_title( $ID ); ?>
But I don’t want to have to change the template in case I change the page assigned as the static home page. Is there a way I can programmatically get the ID of the page currently assigned as the static home page? Thanks.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to get the title of a page set as the home page from another page?’ is closed to new replies.