Hi,
Thanks for the answer.
I tried it, but it doesn’t seem working…
This is the code I put into Theme Functions(function.php).
add_filter( 'dwqa_prepare_archive_posts', 'dwqa_theme_category_filter' );
function dwqa_theme_category_filter( $args ) {
if ( is_page( 140 ) ) { // Please insert you page ID you want to show question category
$args['tax_query'][] = array(
'taxonomy' => 'dwqa-question_category',
'terms' => 'lean-in', // Please insert your category's slug here
'field' => 'slug'
);
}
return $args;
}
Is the shortcode at the front-end still [dwqa-list-questions] ?
Also, since I have many posts, I want to show all the questions in specific category in each category (for example, I want to show all the questions in “lean-in” category to the post lean-in; all the questions in category XX to post XX), does it mean whenever I add a new post with new question category, I need to modify the function.php like this? Is there any other way to do this?
Here’s my site with your suggested code put in function.php already : https://bookdigest.club/function-testing-post/
maybe it helps to explain the problem…
And thank you very much for the support.