I have a feature slider set up that draws in posts that are tagged 'feature'
$my_query = new WP_Query(array(
'showposts' => 3,
'tag' => 'feature' ));
Is is possible to draw in posts AND pages?
I know you can draw pages with 'post_type'=>'page'
but can you mix the two?
You can specify an array value for the post_type
parameter, as such:
$my_query = new WP_Query(array(
'post_type' => array('post', 'page'),
'tag' => 'feature'
));
See this page for more info: WP Codex
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With