“.. in Category Description …”
Sorry I don’t understand what you mean?
do you have URL where I can see/understand the problem?
Hi,
At the bottommost of the page https://www.cashfry.in/amazon-coupons/, above the footer there is a description written about Amazon, with the title “Description About the S……..” If I put [news cat=3] it does not show any news. It shows only [news cat=3]
If I put the same shortcode in any post [news cat=3], it shows the news.
Yes this will print all news in category id=3
maybe I understand you now …. You are placing a short code in a Category description … in the editor.
Yes this will never work … not supposed to …
But that would be great if you make little change in the coding, enabling to show the news on category page with the shortcode.
hmmm … I will try 🙂
Maybe a quick solution to your problem is to create some normal pages and use them for News Cat Archive
Sorry …. a better solution … I think
function simple_news_show_cpt_archives( $query ) {
if( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) {
$query->set( 'post_type', array(
'post', 'nav_menu_item', 'news'
));
return $query;
}
}
add_filter( 'pre_get_posts', 'simple_news_show_cpt_archives' );
Print that in the news.php file at the bottom of the page ….
Source: https://wpbeaches.com/show-custom-post-types-category-archive-page/
It works but I think I shall have to make a few changes. Grateful to you.