WordPress.org

Support

Support » How-To and Troubleshooting » How to display posts in dynamic category

How to display posts in dynamic category

  • hi,
    i’ve problem while display posts from specific category in my lyric site.

    here is :

    Cat1
    Post Cat1
    — Post Cat2
    – Child1 of Cat1
    — Post1 Child1 of Cat1
    — Post2 Child1 of Cat1
    – Child2 of Cat1
    — Post1 Child2 of Cat1
    — Post2 Child2 of Cat1
    so,
    when i’m on category “cat 1”
    only “post cat1” and “post cat2” will be shown
    if i’m on category “child1 of cat1”
    only “Post1 Child1 of Cat1” and “Post2 Child1 of Cat1” will be shown

    thank

Viewing 1 replies (of 1 total)
  • i’ve tried this

    <?php
    $categoryvariable=$cat;
    $query= ‘cat=’ . $categoryvariable. ‘&orderby=date&order=ASC’;
    query_posts($query);
    ?>

    but i still can’t prevent post from child category to appear

    thanks

Viewing 1 replies (of 1 total)
  • The topic ‘How to display posts in dynamic category’ is closed to new replies.
Skip to toolbar