Display nothing when user changes post category
-
In the sidebar, I have a number of text widgets with a shortcut. For example:
[display-posts category=”recent-news” include_author=”true” include_date=”true” date_format=”j F, Y” include_excerpt=”true” excerpt_more=”Read More” excerpt_more_link=”true” include_excerpt_dash=”false” excerpt_length=”15″ wrapper=”div” ?wrapper_id=”recent-post” wrapper_class=”post-grid-layout”]
If the user changes the category of the post from recent-news to ,say, archive-news, the post is not displayed, but what is left is an empty space and my background-color styling. (Widget titles are empty.)
<aside id=”text-6” class=”widget widget_text”>
<div class=”textwidget”> </div>
</aside>How can I not display this? (I don’t want to break up the display with a ’no posts found’ type message.)
There’s white space in the div so can’t use pseudo-selector empty.
- The topic ‘Display nothing when user changes post category’ is closed to new replies.