Support » Theme: Poseidon » Category

  • Resolved ramponi

    (@ramponi)


    The code below shows the subcategories linked to the selected category. And when clicking on the subcategory link it will show the subcategories of that selected subcategory.

    And so on. However, he is not showing the posts when he is at the last level of the subcategory.

    How do I get this code to bring posts related to the selected subcategory?

    For example:

    The category “car” has the subcategories “tires” and “parts”. And the “parts” subcategory has the “engine” and “glass” subcategory. And the “engine” category has the post “Engine 1”.

    When I click on the category “car” the page needs to show only the subcategories “tires” and “parts”.

    When I click on the “parts” subcategory it should show the “engine” and “glass” subcategories

    Finally, when I click on the subcategory “engine” it should show posts related to “engine”.

    global $cat;
    $categoriasFilhas = get_categories(‘parent=’ . $cat);
    foreach($categoriasFilhas as $category) {
    echo ‘<p>term_id ) . ‘” >’ . $category->name.’</p>’;
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • Theme Author ThemeZee

    (@themezee)

    Hi there,

    Thanks so much for using Poseidon.

    I’m not sure what this code has to do with my theme? I suggest to post this question in one of the general support forums since this seems not to be any design issue.

    Cheers,
    Thomas

    Hi,

    Ok. Sorry.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.