[resolved] Using get_cat_ID (3 posts)

  1. rwwood
    Posted 5 years ago #

    I'm trying to develop a template that gives a listing of either category titles or post titles, depending on whether the link points to a category that is just a parent of other categories or to a category that has posts.

    So far I have the following:

    <h2 class="pagetitle">
      <?php single_cat_title(); ?>
    <div class="list-page">
      <?php wp_list_categories('orderby=name&child_of=4&title_li='); ?>

    Obviously, this works fine for the one category in question, which has none of its own posts but a parent to other categories. I'm at a loss however for how I need to alter this for my desired result.

    Thanks for any help.

  2. rwwood
    Posted 5 years ago #

    I should have mentioned why I used the title for the thread that I did. I'm trying to figure out how to use get_cat_ID to supply the "child_of" argument for wp_list_categories.


  3. rwwood
    Posted 5 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.