Custom posts type loop linking to standard post title
-
Hi,
I have a little problem with custom posts type loop.I would like to display my custom posts type after standard post article. I would like list of custom posts to be genereted by tags – only custom posts with tags same as standard post title.
E.g. standard post title: Cristóbal Coló
After this post I want to display custom posts with “Cristóbal Coló” tag.I should, I guess, put some linking code to standard post type to my custom posts type loop. And I dont now what this code should be.
My custom post loop:
<?php $args = array( 'post_type' => 'product', 'posts_per_page' => 10, 'product_tags' => 'krzysztof-kolumb', 'order'=> 'ASC', 'orderby' => 'title'); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post(); the_title(); echo '<div class="entry-content">'; the_content(); echo '</div>'; endwhile; ?>
The topic ‘Custom posts type loop linking to standard post title’ is closed to new replies.