- This topic has 9 replies, 3 voices, and was last updated 5 years, 8 months ago by Tom.
-
AuthorPosts
-
August 21, 2018 at 6:02 am #655571generator
Hello,
I realized suddenly my <title> on index-page is empty.
But it’s there on subpages.A few days ago I deleted the Title in the settings tab, because I only wanted the page-title showing up as <title>
But on that day everything worked fine, but now the whole title-tag is empty.Can you please help?
The only other thing I did is, I updated a Elementor Addon by Livemesh, I already checked via deactivating it, it doesn’t solve the problemAugust 21, 2018 at 9:37 am #655907LeoStaffCustomer SupportHi there,
Is there a specific page or element I should be looking at?
Keep in mind that if it’s something to do with Elementor then it’s best to ask their support π
August 21, 2018 at 11:44 am #656022generatorYes on the title tag of the home-page.
(And because of that the home pages browser tab contains only the domain name, not the title I entered.)This is because the title tag on the home page (on the index.php) is empty, but there should actually be the title I entered in the wordpress-page-backend.
The titles on subpages work correctly, they contain the title I entered in their pages.It can actually not be caused by Elementor because the page title comes from the ordinary wordpress-page-backend. I already checked that by deactivating their plugins.
August 21, 2018 at 11:52 am #656030LeoStaffCustomer SupportSo something is entered in Site Title here?
https://docs.generatepress.com/article/site-title-tagline/August 21, 2018 at 11:57 am #656036generatorNo there is nothing entered, because I dont wanted it to appear in browser tab (and in search result title) as a second title behind the page title.
But even IF I enter a title there, THIS title shows up but not the one I entered in the pages title field.This only happens on index page.
I already found some other posts on the internet about this problem. Should I create a child of the index.php and enter these codes in the title-tag to fix it?
But strange it happened just a little while ago, it worked fine all the time before.The mentioned links are:
https://wordpress.stackexchange.com/questions/43619/empty-title-on-front-page-home
https://pixert.com/blog/wordpress-title-empty-on-index-page/August 21, 2018 at 5:08 pm #656250TomLead DeveloperLead DeveloperHave you considered using a plugin like Yoast SEO? It allows you to manually set your title tag on each page.
August 22, 2018 at 2:36 am #656567generatorI had no need to use Yoast because individual page titles already came from the wordpress-page-title-field in the backend. This worked fine since forever without any coding, just by default. But now suddenly the tag is empty (or only filled with the title from settings tab).
EDIT: Ok, now I tried to simply add it using a Hook-Element wp_head but it doesn’t show up. Can you recommend a filter for the functions.php that touches the front-page title, so I can set it this way.
Or how can I otherwise edit your title-tag, I wanted to add code mentioned in the links here in this thread.August 22, 2018 at 10:23 am #657044TomLead DeveloperLead DeveloperGive this function a try:
add_filter( 'document_title_parts', function( $title ) { if ( is_front_page() ) { $title['title'] = 'Your home page title'; } return $title; } );
Let me know π
August 26, 2018 at 9:14 am #660435generatorOk, thank you very much that worked.
August 26, 2018 at 9:31 am #660451TomLead DeveloperLead DeveloperYou’re welcome π
-
AuthorPosts
- You must be logged in to reply to this topic.