Home › Forums › Back End › WordPress post to right place on theme.. › Reply To: WordPress post to right place on theme..
May 25, 2015 at 5:52 am
#202789
Ilan Firsov
Participant
Wordpress gives you the option to use WP_Query class to create custom loops. I have not used it myself, but depending on how you structure your data it should allow you to do what you want.
Example from the docs:
Display posts tagged with bob, under people custom taxonomy
$args = array(
'post_type' => 'post',
'tax_query' => array(
array(
'taxonomy' => 'people',
'field' => 'slug',
'terms' => 'bob',
),
),
);
$query = new WP_Query( $args );
// The Loop
while ( $query->have_posts() ) {
$query->the_post();
echo '<li>' . get_the_title() . '</li>';
}
wp_reset_postdata();