WordPress.org

Support

Support » How-To and Troubleshooting » Display list of categories on archives page from category intersection???

Display list of categories on archives page from category intersection???

  • Hello,

    I am trying to find out how to display a list of categories from a category intersection on the archives page. For example, if the URL is http://mysite.com/category/blue+red+green I want it to say something like “Current Categories: Blue, Red, Green” at the top of the webpage. How can I accomplish this?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • <?php $args = array(
    	'show_option_all'    => '',
    	'orderby'            => 'name',
    	'order'              => 'ASC',
    	'style'              => 'list',
    	'show_count'         => 0,
    	'hide_empty'         => 0,
    	'use_desc_for_title' => 1,
    	'child_of'           => 0,
    	'feed'               => '',
    	'feed_type'          => '',
    	'feed_image'         => '',
    	'exclude'            => '',
    	'exclude_tree'       => '',
    	'include'            => '',
    	'hierarchical'       => 0,
    	'title_li'           => __( '' ),
    	'show_option_none'   => __('No categories'),
    	'number'             => null,
    	'echo'               => 1,
    	'depth'              => 0,
    	'current_category'   => 0,
    	'pad_counts'         => 0,
    	'taxonomy'           => 'category',
    	'walker'             => null
    ); ?>
    <ul>
    <?php wp_list_categories( $args ); ?>
    </ul>

    may be this will help you

    @akhilesh Shukla Thanks, I tried it and it didn’t work though. It listed every single category instead of just the ones intersected on the archives page.

    keesiemeijer
    Moderator

    @keesiemeijer

    Are you using a plugin to have categories show under http://mysite.com/category/blue+red+green

    If I try that on my site with correct category slugs I get a “Nothing Found” page.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Display list of categories on archives page from category intersection???’ is closed to new replies.