• 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

    (@alfredk)

    <?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.