WordPress.org

Ready to get started?Download WordPress

Forums

Share and Follow
$page_title for empty categories (2 posts)

  1. thirzah
    Member
    Posted 3 years ago #

    Hiya,

    I had errors when linking to categories with no posts (which I need to do since I'm using categories 'creatively' ;)

    So I suggest this slight change to functions.php

    if ( is_category() || is_archive()) {
    
    //    $category = get_the_category();
    //    $page_title = $page_title." | ".$category[0]->cat_name;
    
    $page_title = $page_title . wp_title( '|', false, 'right' );
    }

    Correct as you see fit :)

  2. andykillen
    Member
    Plugin Author

    Posted 3 years ago #

    thanks thirzah,

    I'll look to add that in.

    All the best
    Andy

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic