Support » Fixing WordPress » How to find selected category name ?

  • Hello,
    I’d like to add to my theme a category.php page used when a specific category is selected for display.
    I’d like to have at the top of the page something like
    “these are the posts in the category CATEGORY_NAME”
    $the_category() returns the category a specifi post belongs to but its seem to need to be inside the
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    What I would need is something like
    these are the posts in the category <?php the_global_category(','); ?> category
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    Is it possible and how ?
    Luc`

Viewing 1 replies (of 1 total)
  • Thanks a lot Beel
    it works !
    In case it could help the answer is
    “you will find below all my post in the category <?php single_cat_title('',true) ; ?>
    “true” for diplaying the name
    Thanks again
    Luc

Viewing 1 replies (of 1 total)
  • The topic ‘How to find selected category name ?’ is closed to new replies.