Apparent bug in function genesis_default_title

Community Forums Forums General Discussion Apparent bug in function genesis_default_title

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  Susan 8 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #64973

    Shivanand Sharma
    Participant

    is_singular() block should return the post title as a last resort. Currently if none of the if conditions are met it returns blank and the title tag is empty. I just switched to Genesis from another theme and there are no custom fields left by the previous theme, thus genesis doesn’t pull a <title>.

    Seemingly simple solution which will prevent such surprises for first time Genesis switchers:

    add_filter( 'wp_title', 'lander_default_title', 11, 3 );
    function lander_default_title($title) {
    	if(is_singular() && empty($title))
    		{	
    		return get_the_title();
    		}
    	return $title;
    }
    #74574

    Susan
    Moderator
    Post count: 7977

    Thanks for the tip!


    Susan @ Graphically Designing I’d love to customize your website! I tweet!
    I’ve taken up the challenge! – help me answer some of the unanswered posts

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.