Ready to get started?Download WordPress


2 problems with categories (9 posts)

  1. xer47
    Posted 9 years ago #

    Hi! First of all I want to say thank you to the dev. team for this beautiful script, but I have 2 problems I cant solve by myself.

    1st - I cant make the empty categories on my website to appear on the list (main page menu), unless I put some content in those categories. That might be not an issue for some people, but imagine this:

    I have I main category called "History", within this category I have a sub-category called "German", but within this sub-category I have 2 categories called "Book-1" and "Book-2", thus I post different chapters of the book1 within category "Book1" So on the main page all the main categories like - History--->German don’t appear, unless I put something in there, so it does not work as a "tree".

    2nd, keep in mind the problem #1, imagine that different chapters in the category called Book-1 are really big - 2-4 pages long (I don’t split them up so they are - one long page), but when I click on the category Book-1 in the main menu, it opens up a huge page with all those chapters, full text in a row.

    So I’m wondering if there’s any way to structure it more efficiently (some kind of plug-in), so I can at least use the <!--more--> thing in there as well, not just on the main page, where all the posts from different categories go.

    thank you in advance.

  2. Lorelle
    Posted 9 years ago #

    1. Use Excerpts for category or index page views (not single post views) to shorten what you show people:


    2. Set the categories tag to show hidden (empty) categories:


  3. xer47
    Posted 9 years ago #

    Thx for your reply, but as I understand to get all of my categories listed I need this <?php wp_list_cats('hierarchical'); ?> but where do I put this? Sorry Im not that experienced with WP =(

  4. Root
    Posted 9 years ago #

    Its going to be in sidebar.php or similar.

  5. xer47
    Posted 9 years ago #

    thx, but the default in my theme is <?php wp_list_cats('optioncount=0'); ?>
    I changed it to <?php wp_list_cats('all=1'); ?> - it did not work, I tried <?php wp_list_cats('all'); ?> still no go. It does not show the empty ones.

  6. xer47
    Posted 9 years ago #

    heh, thats strange, I have tried different variations of <?php wp_list_cats('optioncount=1', 'all=1', 'hierarchical=1'); ?> and so on so forth, with my theme and the default classic theme for WP - max it does : shows the feeds for rss2 /or number of articles in each category.

    Then I putted some test stuff into the empty categories and they appeared, however, even with 'hierarchical=1' they are just categories, they dont look like a "tree" (with main categories, sub categories and sub-subcategories)that I want to make =(

  7. xer47
    Posted 9 years ago #

    Also looking at this http://www.alexking.org/index.php?content=software/wordpress/themes.php i found that it's theme related, but still i cant make look like a "tree"

  8. xer47
    Posted 9 years ago #

    This is ridiculous, I can see it on dozens of websites and I can make the empty ones appear with <?php dropdown_cats(true); ?> but still cant make it work as a normal menu !

  9. xer47
    Posted 9 years ago #

    Guess I just solved it by editing template-functions-category.php

    oh and yes, I have to say this http://codex.wordpress.org/Template_Tags/list_cats isnt noob friendly.


Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.