- This topic has 9 replies, 2 voices, and was last updated 1 year, 7 months ago by David.
August 1, 2019 at 8:24 am #973136Yannick
I have read many support posts and can’t seem to find my answer (some solution are from 2015 and GP must have changed since then because the options are not available anymore).
All I want to do, is on my front page only, to show a different title then “Home”. My page name is “Home” and I would like for it to show something different, like “Welcome to my website”.
I’m pretty sure it has to do with the hooks, but I can’t make it work.August 1, 2019 at 9:02 am #973170DavidStaffCustomer Support
what is stopping your from changing the Title of your Home page to “Welcome to my website”?
If you want it to say Home in the Navigation then you can edit the menu label.
Alternatively you can:
Use the Disable Elements meta box to disable the Content Title and add your own
<h1>title</h1>to the page:
or create a Header Element and add the
<h1>title</h1>to its content:August 1, 2019 at 9:05 am #973173Yannick
For logical reasons, I want it to be “Home” and not “Welcome to my website” in the page list. I know I can change the menu label 🙂
I already have a “Header Element” in place. Can I use PHP code and check if the page is the front page?August 1, 2019 at 9:08 am #973177DavidStaffCustomer Support
Go to Appearance > Menus where you can create your menu and assign it to the Primary ( or Secondary ) navigation – each menu item you add you can edit the Menu Label to display something different.
Header Elements have Display Rules tab – if you have one set to the Entire Site then add an Exclude Rule of the Front Page. Then create a new Header Element just for your Home and select the Front Page location in the display rules.August 1, 2019 at 9:09 am #973180Yannick
You guys should consider PHP code in the Header element. Duplicating my current Header element will take a while since it has a lot of specifics 🙂August 1, 2019 at 9:13 am #973182DavidStaffCustomer Support
If i need to make a duplicate of lots of posts/elements or something that is complex i will use the Duplicate Posts plugin to save time.
The Header Element already uses PHP Conditionals for its display rules. We don’t allow PHP in the header element post type as it can introduce potential security risks. We ( reluctantly ) allow it in the Hooks element as it is quite a common requirement.August 1, 2019 at 9:14 am #973187Yannick
Then why not be able to hook into the wp_title() one available in WP and let me change it based on the current page (is_front_page())?August 1, 2019 at 9:19 am #973193DavidStaffCustomer Support
There is nothing stopping you from writing your own conditional filter to change the title in your child theme functions.php. As the Header Element is a Post Type, it is not the place for adding PHP code – and to be honest sounds really complicated to change the title of a single page.August 1, 2019 at 9:23 am #973196Yannick
Fair enough. Thanks for your time David!August 1, 2019 at 9:28 am #973210
- You must be logged in to reply to this topic.