• Hi guys,

    Wassup? I tried to find the solution of my problem but I can’t find it anywhere… I hope someone will be a wordpress master to help me ??

    here is my problem:

    I have a custom post type called “produits” using taxonomy for this post type called “filtres”. To display the taxonomy list I use this code:

    $orderby = 'name';
    $show_count = 0; // 1 for yes, 0 for no
    $pad_counts = 0; // 1 for yes, 0 for no
    $hierarchical = 1; // 1 for yes, 0 for no
    $taxonomy = 'filtres';
    $title = '';
    
    $args = array(
      'orderby' => $orderby,
      'show_count' => $show_count,
      'pad_counts' => $pad_counts,
      'hierarchical' => $hierarchical,
      'taxonomy' => $taxonomy,
      'title_li' => $title
    );
    ?>
    
    <?php
    wp_list_categories($args);
    ?>

    Everything works fine! I need to highlight the current-cat so I used the CSS to do that and it works! Going in the taxonomy, highlighting work too ! The problem is when I visit a single post of my post type, the current-cat doesn’t appear in the <li > < /li>

    Does anyone know how to add the “current-cat” class to my wp_list_categories in a single post type?

    Thanks a lot guys, you’ll make my day ! ??

    BTW HAPPY NEW YEAR !

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Current-cat in single post type’ is closed to new replies.