Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End WordPress post to right place on theme.. Reply To: WordPress post to right place on theme..

#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();