WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Wp list categories limit ? (3 posts)

  1. Fatih Toprak
    Member
    Posted 1 year ago #

    i m using like this wp_list_categories function :

    <ul>
    <?php wp_list_categories('title_li=0&cat=18&child_of=1&hide_empty=0&style=list&show_count=1&sort_by=count'); ?>
    </ul>

    could we limit this query ?

    like i want to displat top 10 categories ?

    is that possible ?

    thank you.

  2. Jonathan Dingman
    Member
    Posted 1 year ago #

    http://codex.wordpress.org/Template_Tags/wp_list_categories

    ie number=10 will limit it to the first 10 categories.

    the "top 10" categories would be more difficult to do with this function. You would likely have to use a custom function.

  3. Fatih Toprak
    Member
    Posted 1 year ago #

    that works for me i guess it s enough for my small bussiness (:

    Thanks Jonathan.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags