WordPress.org

Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 5 years ago

#9221 closed defect (bug) (duplicate)

wp_title not working for front page

Reported by: thomask Owned by:
Milestone: Priority: normal
Severity: trivial Version: 2.7.1
Component: General Keywords: wp_title
Focuses: Cc:

Description

Starting from 2.7 (and the same for 2.7.1) the wp_title function does not work for homepage (both static and last new settings in options-reading)
e.g. if i do <title><?php wp_title() ?></title> and set up a static page, there will be no title at all. If I set up news page and go to that page which was previously set-up as static, the normal title of the page appears, but the title of homepage will be again nothing.

Change History (4)

#1 @FFEMTcJ
11 years ago

Text from #9222:

i have posted a bugreport that wp_title is not working on homepage for both static page and news page. I do not see it here, but i have probably found the problem

in general-template.php, in wp_title function, row 435, there is

if ( is_single() ( is_page() && !is_front_page() ) ) {

so the front page is explicitely excluded. And the problem is, that there is no definition for front page. So you should add definition for front page, or delete "&& !is_front_page()" part (but i do not know if it would work for front_page which is not Page)

#2 @FFEMTcJ
11 years ago

  • Milestone changed from Unassigned to 2.7.2
  • Priority changed from high to normal

#3 @sivel
11 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

duplicate of #9288

#4 @DrewAPicture
5 years ago

  • Milestone 2.7.2 deleted
Note: See TracTickets for help on using tickets.