0

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

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

2
  • 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?
    – Gowri
    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. Mar 6 '13 at 13:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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