Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End How to Show/Call all WP Categories on one page

  • This topic is empty.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #174817
    iamRDM
    Participant

    I want my Categories to appear in this format
    http://i59.tinypic.com/2ihasrn.png

    If I add a new category It should be added automatically.

    #174819
    Senff
    Participant
    #174820
    iamRDM
    Participant

    Can you elaborate please ?

    I don’t have much knowledge of WP.

    #174821
    Senff
    Participant

    Well, what have you tried so far? Look under the “Examples” to see what code you’ll have to insert in your templates in order to show the categories. For example:

    <ul>
    <?php wp_list_categories('orderby=name'); ?>; 
    </ul>
    

    Or

    <ul> 
    <?php wp_list_categories('orderby=id&show_count=1&use_desc_for_title=0&child_of=8'); ?>
    </ul>
    

    Or… you could use a plugin that does that for you.

    Either way, try something yourself first and if you get stuck, show us what you got and we’ll try to help.

    #174823
    iamRDM
    Participant

    @senff I tried this code
    <?php wp_list_categories( 'orderby=name&show_count=1&title_li=&hierarchical=1' ); ?>

    Its showing Categories but not the Subcategories

    acc to this it should but no luck so far

    hierarchical 
    (boolean) Display sub-categories as inner list items (below the parent list item) or inline. The default is true (display sub-categories below the parent list item). Valid values:
    1 (True) - Default
    0 (False)
    #174824
    iamRDM
    Participant

    @senff I got the solution :D
    <?php wp_list_categories('hide_empty=0&orderby=name&show_count=1&title_li=' ); ?>

    This Worked for me :)

    #174833
    iamRDM
    Participant

    @senff how to style it now ? As I’ve shown in the photo.
    Just tell me where and how, rest I’ll do.

    #174834
    Paulie_D
    Member

    Inspect the output HTML and go from there…it’s really not that hard.

    #174837
    iamRDM
    Participant

    @Paulie_D Thanks for the reply. Going through the output sounds right.

Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘Back End’ is closed to new topics and replies.