WordPress.org

Ready to get started?Download WordPress

Forums

Flexible Posts Widget
[resolved] Hide title when no post found (2 posts)

  1. pauro
    Member
    Posted 6 months ago #

    Hi there,
    First, thank you for this simple but very handy plugin

    I use this widget to pull some post in certain category, off course when the category is empty, the 'no post found' will appear. But the problem is, the widget title <h2> is also appear.

    How can I make the widget title disappear when there is no post within the category?

    thanks in advance
    p

    https://wordpress.org/plugins/flexible-posts-widget/

  2. DaveE
    Member
    Plugin Author

    Posted 6 months ago #

    Hi Pauro,

    The simplest way to do this would be to create a custom HTML template in your theme folder and then remove lines 37-40 from your custom template:

    <?php else: // We have no posts ?>
    	<div class="dpe-flexible-posts no-posts">
    		<p><?php _e( 'No post found', 'flexible-posts-widget' ); ?></p>
    	</div>

    Cheers!

Reply

You must log in to post.

About this Plugin

About this Topic