Show a message if there are no active posts in category


I want to show a specific message or a page or post if there are no active posts in a particular category. Currently, it shows a default “Content not found” message.

I created a new template-blog.php file to my child-theme and tried to exchange the 404 part after the

<php? else : >

tag to no avail. The original part, I think plays a role in that:

<?php pinboard_posts_nav(); ?>
<?php else : ?>
    <?php pinboard_404(); ?>
<?php endif; ?>
<?php wp_reset_postdata(); ?>
, , Taavi Miku 4 years 2020-03-24T08:52:24-05:00 0 Answers 115 views 0

Leave an answer