• On my blog at https://writerhoward.com in the right sidebar is a section headed Categories. Items such as Blogroll, which do not contain any posts, don’t belong there. How can I remove the items that don’t contain posts from the Categories list, while retaining their listings lower down in the sidebar below the calendar and Archive?

Viewing 4 replies - 1 through 4 (of 4 total)
  • I “think” I can diresct you a tiny bit… if I can find the right words to explain.

    Go to your site’s WordPress login page. The one where you sign in online as “admin.”

    Click on “Manage”

    Under the “Manage” there is a “Categories” section. You can delete Categories from here!!!

    Thread Starter writerhoward

    (@writerhoward)

    I just want to delete the categories listed in the top Categories section that will never have posts, not the categories themselves such as Blogroll as they have their own sections. I think what you’re suggesting will remove them from both places.

    Not sure what you are using to display categories but the hide_empty=1 parameter when used with the template tag, wp_list_categories(), will suppress the display of categories with no posts.

    Thread Starter writerhoward

    (@writerhoward)

    Here’s the current code:

    <h2>Categories</h2>

      <?php wp_list_cats(‘sort_column=name&list=0&optioncount=1&hierarchical=1&children=1&hide_empty=0’); ?>

    I changed it to hide_empty=1. That solved my problem. Thank you very much.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How can I fix this?’ is closed to new replies.