WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 10 months ago

#45353 new defect (bug)

Homepage title none static homepage when static blog page is set

Reported by: BackuPs Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.9.8
Component: Options, Meta APIs Keywords:
Focuses: Cc:

Description

Hi

I have issue with the title of teh page in the browser tab. When i use a seo plugin and i have a static blog page set and a non static homepage the none static home page show the static blog page title in the browser tab.

I have tested this with wp 20-17 and various other themes and they all have the same issue.

I tried AIOSEO and YOAST SEO and even if i enter the title for the nin static homepage i get the title for the static blog page.

I reported to both plugin builders and they sais i had to be at wordpress core team.

You can read all details here. https://github.com/Yoast/wordpress-seo/issues/11548

1) static blog page none static home page. When Index.php is called
is_home = true is_front_page=false

2) static home page none static blog page. When front_page.php is called
is_home = false is_front_page=true

3) none static home page and none static blog page (set it to "your latest posts"). When Index.php is called is_home = true is_front_page=true;

Exactly as it should be, But only in case 1) the browser tab has the wrong title !

Please advice how to resolve this issue as the none static home page is not equal to the static homepage and can have different content then the static blog page. It all depends on the theme used if the theme is also pulling the default page content and or has a setting for adding content into the non static home page.

One can easily detect the homepage id.... for the none static homepage it is 0 https://github.com/Yoast/wordpress-seo/issues/11548#issuecomment-438643740

is_home() should only be true in case 3) and not in case a static blog page is used and a none static home page.

I would like to get this resolved. Please advice.

Thanks

Change History (3)

#1 @BackuPs
3 years ago

Hi Core team

can we get a reply on this issue? Yoast and AIOSEO are pointin to wordpress. But no reply from the core team.

Thank you !

#2 @pento
3 years ago

  • Version changed from 5.0 to 4.9.8

#3 @sabernhardt
10 months ago

  • Component changed from General to Options, Meta APIs

When switching the homepage option from your latest posts to a static page, the show_on_front option changes from posts to page. This should require at least a static homepage, yet the Reading Settings screen and Customizer do not give an error message if no homepage is selected. (The customizer's instructions include: "To set a static homepage, you first need to create two Pages. One will become the homepage, and the other will be where your posts are displayed.")

Yoast only checks the show_on_front option value, without making sure a static front page is set. So the Search Appearance screen does not offer the option to set title and description there, and the link to the static front page can have an empty href. If the homepage setting is "your latest posts," Yoast's Search Appearance screen is where to edit the title and description for the homepage with that plugin.

This probably does not relate to the theme template file, but that part sounds correct:
https://developer.wordpress.org/themes/basics/template-hierarchy/

Note: See TracTickets for help on using tickets.