menu

arrow_back How do I merge page and custom post-type output?

by
1 vote
I need to merge two types of pages so that they have the same pagination.

$args = array( 
'post_type' => 'al_product',
'posts_per_page' => -1,
's' => $s
);
$args = array( 
'post_type' => 'page',
'posts_per_page' => -1,
's' => $s,
'tax_query' => array(
array(
'taxonomy' => 'products',
'field' => 'slug',
'terms' => array('portfolio_post'),
'include_children' => true,
),
)
);

1 Answer

by
 
Best answer
0 votes
The post_type argument can take an array as a value, but it's bad practice to create a taxonomy for the post_type page, as I told you before