Title: Tag.php
Last modified: August 21, 2016

---

# Tag.php

 *  [Alfred K](https://wordpress.org/support/users/alfredk/)
 * (@alfredk)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/tagphp/)
 * Hello, I’m trying to get a custom post type of recipes and tag of recipes to 
   go into the tag cloud. I’m using wordpress tag cloud and filtering by tags. I’m
   editing the tag.php
 *     ```
       <?php if (have_posts()) : ?>
       				<?php $args = array('post_type' => array('post','recipes'));
       							$loop = new WP_Query( $args );
       				while ( $loop->have_posts() ) : $loop->the_post(); ?>
       				<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
       			<div class="entry">
       			<?php the_content('Read the rest of this entry »'); ?>
       			</div>
       			<?php endwhile; ?>
       		<?php endif; ?>
       ```
   
 * This seems to just display all post types without the tag filter.
 * Thanks and I can provide more code examples

Viewing 1 replies (of 1 total)

 *  Thread Starter [Alfred K](https://wordpress.org/support/users/alfredk/)
 * (@alfredk)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/tagphp/#post-4457638)
 *     ```
       <?php $args = array('post_type' => array('post','recipes'));
       							$loop = new WP_Query( $args );
       ```
   
 * This is the line I changes to add the filter but again just displaying all post
   and custom post types and not filtering by tag.
 * Thanks

Viewing 1 replies (of 1 total)

The topic ‘Tag.php’ 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/)
 * 1 reply
 * 1 participant
 * Last reply from: [Alfred K](https://wordpress.org/support/users/alfredk/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/tagphp/#post-4457638)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
