I need to display posts assigned to taxonomy term. I can do it manually with no problem but I would like to have a loop to automaticall display posts from each taxonomy term so when user adds new term the posts from that term are displayed on the site. You can see the live example on the following url;
176.9.5.243/~divesdes/shop
I am using Woocommerce to build an online store. Here is the code I am using to disply posts manually.
<?php query_posts('post_type=product&product_cat=striped-mats'); ?>
<?php single_cat_title( ); ?>
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php the_content();?>
<?php endwhile;
wp_reset_query();?>
<?php endif; ?>
Thanks to everyone who would want to help me with this...
First of all you can use this service that can write the code for you : http://generatewp.com/
This is a cool tool that allowing you to build the code for several parts of the WordPress theme.
Otherwise you can use the WP_Query class to create a query object like that: