• Resolved sunlight1976

    (@sunlight1976)


    I’m wondering how to customize category page in my child theme, but I can’t find how.

    I’m trying to show subcategories in category page.

    this should be the code, but I can’t imagine where to put it.
    There is not a category.php

    if (is_category()) {$this_category = get_category($cat); }
    
    if($this_category->category_parent)
        $this_category = wp_list_categories('orderby=id&show_count=0&title_li=&use_desc_for_title=1&child_of='.$this_category->category_parent."&echo=0");
    else
        $this_category = wp_list_categories('orderby=id&depth=1&show_count=0&title_li=&use_desc_for_title=1&child_of='.$this_category->cat_ID."&echo=0");
    
    if ($this_category) { ?>
        <ul>
            <?php echo $this_category; ?>
        </ul>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Show subcategory in category page’ is closed to new replies.