I'm using the code below to display the latest post from a certain category but i am using Custom Post Types and I don't know how to insert the custom post type function into this code.
I want to get the latest post from a certain category, from each post type.
So how do i add that to the code below.
<?php
$queryObject = new Wp_Query( 'posts_per_page=1&cat=23' );
// The Loop!
if ($queryObject->have_posts()) {
?>
<?php
while ($queryObject->have_posts()){
$queryObject->the_post();
?>
<a href="<?php the_permalink(); ?>" title="<?php printf(__( 'Read %s', 'wpbx' ), wp_specialchars(get_the_title(), 1)) ?>">
<?php the_post_thumbnail('video-post'); ?>
</a>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
<?php
}
?>
<?php wp_reset_postdata();
}
?>
endif;