• Resolved baturica

    (@baturica)


    all post on the tag.php that is coming. How do you want only posts can be viewed in the category.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Pardon?

    tag.php lists all posts that have a specific tag. If you want to list all posts in a given category, you need to be looking at category.php.

    Thread Starter baturica

    (@baturica)

    I found the solution myself
    My English is not very good. Maybe the solution can understand what I am asking 🙂

    posts tagged with the label : <?php single_tag_title(); ?>
    <h2> category name 1</h2>
    <?php
    $current_tag = single_tag_title("", false);
    query_posts(array(
    'cat'=>'26',
    'showposts'=>'3',
    'tag_slug__and'=>array($current_tag),
    ) );
    ?><?php while (have_posts()) : the_post(); ?>
      while....
    <?php endwhile; ?>
    
    <h2> category name 2</h2>
    <?php
    $current_tag = single_tag_title("", false);
    query_posts(array(
    'cat'=>'27',
    'showposts'=>'3',
    'tag_slug__and'=>array($current_tag),
    ) );
    ?><?php while (have_posts()) : the_post(); ?>
    while...
    <?php endwhile; ?>
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘category query on the tag.php’ is closed to new replies.