Various menu title and page title
-
Hi
There are many posts about how to delete or hide the page titles of a website.
What i would like to do is get different names for the menu and the page titles instead of deleting the page titles entirely.
I’m using a static page. The site won’t be used as a blog.
I tried creating custom fields for the pages. Then i read into where to adjust the code to make the custom field show. As far as i got it turns out to be under loop-page.php.
The code to modify is probably the following:
<h1 class="post-title entry-title">
<h1 class="post-title entry-title">
<?php if ( get_the_title() == '' ) { _e( '(No title)', 'graphene' ); } else { the_title(); } ?>
<?php do_action( 'graphene_page_title' ); ?>
</h1>Now for the catch; I have no clue what to change or how to do it. I’m completely new to php and code in general to be honest.
For example I called the custom field “Seitentitel” and set value to “Herzlich Willkommen”. What i would like to have is “Herzlich Willkommen” as a page title instead of the “Home” title I got in the menu.
I hope the question is understandable. I may also have a complete wrong approach to this but wanted to avoid plugins only for that. Help is very appreciated 🙂
Mod
Quote:What i would like to do is get different names for the menu and the page titles instead of deleting the page titles entirely.Are you using a custom menu? If you are, you can change the page’s title in the menu to whatever you would like.
I am. And that actually worked. I had to name the page with what i wanted in the page title and just call the page in the menu structure how I wanted it to be shown in the menu. Thanks. That was too obvious to see…
For whatever I am going to mess with in the future, was the approach I took right or completely wrong? I mean can it be solved there aswell?
Thanks again
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.