Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am decide to make new wordpress website. But my WordPress webdesign structure need home page category navigation bar like directories and it also show only posting counts. Now I am add one sample image,it show how the bar is look like.

  • every category needs icons.
  • option to change number of rows and columns in category.
  • Include exclude specific category
  • Auto Update category count when new post published

how to modify my wordpress website to add this category list bar in my home page under the header. Sample Image Thank You

share|improve this question

1 Answer 1

<?php
$args = array(
    'show_option_all'    => '',
    'orderby'            => 'name',
    'order'              => 'ASC',
    'style'              => 'list',
    'show_count'         => 1, // 1 is true and 0 is false
    'hide_empty'         => 1,
    'use_desc_for_title' => 1,
    'child_of'           => 0,
    'feed'               => '',
    'feed_type'          => '',
    'feed_image'         => '',
    'exclude'            => '',
    'exclude_tree'       => '',
    'include'            => '',
    'hierarchical'       => 1,
    'title_li'           => __( 'Categories' ),
    'show_option_none'   => __('No categories'),
    'number'             => null,
    'echo'               => 1,
    'depth'              => 0,
    'current_category'   => 0,
    'pad_counts'         => 0,
    'taxonomy'           => 'category',
    'walker'             => null
);
wp_list_categories( $args );
?>

Put the codes anywhere you want to display it, If you don't want to display post count , keep 'show_count' => 0 .

For CSS li design, just try it yourself with cool icons. Hope this help you.

You can learn more about categories here: http://codex.wordpress.org/Template_Tags/wp_list_categories http://codex.wordpress.org/Template_Tags/wp_dropdown_categories

share|improve this answer
    
This Answer help me to complete my 65% work Thank you. But now I want to order my category list in 6 columns.Could you know about it? –  Arun Kumar Mar 6 '13 at 12:20
    
@Arun Kumar, CSS is not specific to WordPress (even if they happen in context), see the FAQ. Try StackOverflow if you need help with styling. –  Mike Madern Mar 6 '13 at 13:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.