WordPress.org

Ready to get started?Download WordPress

Ideas

display category title tag just like post title tag

  1. Pete
    Member

    12345

    we have <?php the_title(); ?>

    we need <?php the_cat_title(); ?>

    Posted: 5 years ago #
  2. Justin Tadlock
    Member

    12345
    single_cat_title();

    http://codex.wordpress.org/Template_Tags/single_cat_title

    Posted: 5 years ago #
  3. Pete
    Member

    12345

    Can be used only outside The Loop.

    Posted: 5 years ago #
  4. Using it inside the Loop is not all that difficult:

    <?php
    $cat_title = single_cat_title('display'=>false);
    // THE LOOP ...
    echo $cat_title;
    // END LOOP
    ?>
    Posted: 4 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.

  • Rating

    12345
    3 Votes
  • Status

    Sorry, not right now