• Right now I’m using

    <title><?php if ( is_single() ) { ?> <?php } ?><?php wp_title(':',true,right); ?> Site Title</title>

    so that the title is “post title : Site Title” what do I need to add to make it “category – post title : Site Title”

Viewing 2 replies - 1 through 2 (of 2 total)
  • If you’re doing this within the loop, you could try:

    <?php
    echo '<title>';
    the_category(' - ');
    the_title();
    echo ':';
    echo get_bloginfo('name') . '</title>';
    ?>

    Thread Starter luckiecks

    (@luckiecks)

    It’s in the header which is a separate .php file. When I replace the code the title becomes <a href=” blah blah

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

The topic ‘Category in page title’ is closed to new replies.