I'm using the script below to call post from a certain category in the sidebar. It pulls from all post type on the homepage and on the single post page, but when it comes down to the post type archive pages it doesn't show but only from that post type archive in which you are viewing.....I want it to show from all post types not matter what post type archive you are viewing.
<?php
$queryObject = new Wp_Query( array(
'showposts' => 4,
'post_type' => array('pretty-little-liars', 'revenge', 'once-upon-a-time','scandal'),
'category_name' => celebrity,
'orderby' => 1,
));
// The Loop!
if ($queryObject->have_posts()) {
?>
<?php
while ($queryObject->have_posts()){
$queryObject->the_post();
?>
How do i get it to show post from all post type by category on the post type archive page?
category
taxonomy registered for all of the listed custom post types,pretty-little-liars
,revenge
,once-upon-a-time
, andscandal
? Do posts of all of these custom post types have posts with thecelebrity
term in the category taxonomy?celebrity
'showposts'
with'posts_per_page'
. The former was deprecated some time ago.