I have created a query to return 3 particular posts however at the moment they just appear with the three titles in a list as per the query on WP Codex.
I need them to show as per the blog section but am unsure as to where and how to call the template in. This is my code:
<?php
// The Query
$include_ids = array( '114', '115', '116' );
$query = new WP_Query( array( 'post__in' => $include_ids ) );
// The Loop
if ( $query->have_posts() ) {
echo '<ul>';
while ( $query->have_posts() ) {
$query->the_post();
echo '<li>' . get_the_title() . '</li>';
}
echo '</ul>';
}
?>
Can anyone help me with this please?