WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Show categories by default (5 posts)

  1. splanters
    Member
    Posted 7 years ago #

    Ok,

    On my site I have a journal page - which is basically just being used to show all the posts. I've noticed that the categories do not show by default and I would like them to. I read this article in the codex: http://codex.wordpress.org/Template_Tags/wp_list_cats#Notes_on_use

    And I just want to make sure I'm understanding this correctly. If I want the categories to show by default, I need to change the tag <?php wp_list_cats('optioncount=1&exclude=' . $sidebar_cat_id); ?> - but I'm a little confused as to what I need to change to... If I understood the article correctly, the optioncount needs to be "1" which sets it to true?

    I'm having a little difficulty comprehending (medication will do that to ya) Any help is much appreciated.

  2. tsguitar
    Member
    Posted 7 years ago #

    Show by default? What do you mean? On your entries or in an archive list? optioncount just gives a count of how may entries are in that particular category. A value of 1 is true, so it should be showing those numbers. I don't know about your exclude value, though. I'm not sure what that is and what you're trying to do with it.

  3. splanters
    Member
    Posted 7 years ago #

    Well, I should have explained in a little more detail... As it stands now, by default if you do not have a post in a certain category, that particular category isn't displayed underneath "Categories" - and I would like to change that so it does... I don't know if I clarified that any better or not. Make any sense?

  4. tsguitar
    Member
    Posted 7 years ago #

  5. splanters
    Member
    Posted 7 years ago #

    thanks for your help tsguitar

Topic Closed

This topic has been closed to new replies.

About this Topic