Title: Tag problem&#8230;?
Last modified: August 20, 2016

---

# Tag problem…?

 *  Resolved [ladymsdiva](https://wordpress.org/support/users/ladymsdiva/)
 * (@ladymsdiva)
 * [15 years ago](https://wordpress.org/support/topic/tag-problem-1/)
 * Hello everyone,
 * I have a problem with the tags on my site…
 * [http://cassandradamiris.com/](http://cassandradamiris.com/)
 * Whenever you click on a tag it shows ALL the posts, whether they have this tag
   or not. Does anyone know why this is happening?

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years ago](https://wordpress.org/support/topic/tag-problem-1/#post-2108203)
 * determine which template is creating the output for the tag archive:
    [http://codex.wordpress.org/Template_Hierarchy](http://codex.wordpress.org/Template_Hierarchy)
   [http://codex.wordpress.org/Template_Hierarchy#Tag_display](http://codex.wordpress.org/Template_Hierarchy#Tag_display)
 * then have a look if that template has a custom query (something with `query_posts()`
   or `WP_Query()` ) before the loop;
 * it possibly should not have one.
 * if your theme does not have a tag.php (or archive.php), create one by copying
   index.php and saving it as tag.php (or archive.php) and remove the custom query
   from the code.
 *  Thread Starter [ladymsdiva](https://wordpress.org/support/users/ladymsdiva/)
 * (@ladymsdiva)
 * [15 years ago](https://wordpress.org/support/topic/tag-problem-1/#post-2108204)
 * Thanks.
 * I am using a theme called grid portfolio. I’ve uploaded the tag.php from the 
   theme that came with the core installation (twenty-ten).
 * Here’s the code:
 * _[Code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome).
   Please use the [pastebin](http://wordpress.pastebin.com/)]_
 * Am I on the right track here?
 * I have tried replacing “twenty_ten” with “gridportfolio” but it still doesn’t
   work…
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years ago](https://wordpress.org/support/topic/tag-problem-1/#post-2108212)
 * > Am I on the right track here?
 * probably not.
 * if your theme does not have a tag.php, then make a copy of index.php and save
   it as tag.php;
 * if index.php had a custom query before the loop, remove this from the new tag.
   php.
 * if in doubt, please paste the code of tag.php into a [http://pastebin.com/](http://pastebin.com/)
   and post the link to it here.
 * is this grid portfolio a free theme?
    if so, can you post a download link?
 *  Thread Starter [ladymsdiva](https://wordpress.org/support/users/ladymsdiva/)
 * (@ladymsdiva)
 * [15 years ago](https://wordpress.org/support/topic/tag-problem-1/#post-2108219)
 * Thanks so much for your help..this is the theme [http://free.simplethemes.org/grid-portfolio.php](http://free.simplethemes.org/grid-portfolio.php)
 * The index page is a bit different. Here it is on paste bin [http://pastebin.com/LJPeAbX6](http://pastebin.com/LJPeAbX6)
 * I have an idea about what to start deleting but I tried and got errors…
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years ago](https://wordpress.org/support/topic/tag-problem-1/#post-2108220)
 * found the download;
    the theme was never designed to deal with tags;
 * simply follow my previous suggestion, create the tag.php template from a copy
   of index.php, and remove this section of code:
 *     ```
       $args = array(
                          'category_name' => 'featured small',
                          'post_type' => 'post',
                          'posts_per_page' => 6,
                          'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1),
                          );
             query_posts($args);
       ```
   
 *  Thread Starter [ladymsdiva](https://wordpress.org/support/users/ladymsdiva/)
 * (@ladymsdiva)
 * [15 years ago](https://wordpress.org/support/topic/tag-problem-1/#post-2108222)
 * awesome. Would you know by chance what php code I could use to generate a heading
   for each page like this:
 * Posts tagged with <<insert php code for tag name here>>
 *  Thread Starter [ladymsdiva](https://wordpress.org/support/users/ladymsdiva/)
 * (@ladymsdiva)
 * [15 years ago](https://wordpress.org/support/topic/tag-problem-1/#post-2108240)
 * figured it out:
 * <p>Tag: <?php single_tag_title(); ?></p>
 * Thanks again, you’ve been awesome.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Tag problem…?’ is closed to new replies.

## Tags

 * [tags](https://wordpress.org/support/topic-tag/tags/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 2 participants
 * Last reply from: [ladymsdiva](https://wordpress.org/support/users/ladymsdiva/)
 * Last activity: [15 years ago](https://wordpress.org/support/topic/tag-problem-1/#post-2108240)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
