• Resolved Nick Lewis

    (@nickylew)


    Hi,

    I have the pro version of the plugin.

    I am using the paged isotope layout. I have all my filters above working great, but due to the fact that there aren’t any posts / items on one of the filters on the first page nothing shows up.

    I am wondering, can you add in an error message if there are no posts/items within a particular filter on that page?

    Many Thanks

    https://www.ads-software.com/plugins/wp-ultimate-post-grid/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Brecht

    (@brechtvds)

    Hi there,

    At the moment that’s not possible but I’ll look into it.

    Brecht

    Thread Starter Nick Lewis

    (@nickylew)

    Ok.

    That would be great if you can look into that for me. ??

    Thanks.

    Thread Starter Nick Lewis

    (@nickylew)

    Is it something I could do?

    I am using your plugin as part of a site build at the moment.

    Plugin Author Brecht

    (@brechtvds)

    Is it urgent? I can add this feature in the next update (in about 2 weeks, if I had to guess).

    Thread Starter Nick Lewis

    (@nickylew)

    It is pretty urgent…

    The site is due to go to the client later today/tomorrow but due to go live next week I believe.

    Plugin Author Brecht

    (@brechtvds)

    Hi again,

    I’ve looked into it for you and for now you could do this yourself by adding the following JavaScript to any JS file that’s loaded on that page:

    jQuery(document).on('wpupgFiltered', function() {
        var container = jQuery('#wpupg-grid-my-blog-posts'),
            nbr_filtered = container.data('isotope').filteredItems.length;
    
        jQuery('.wpupg-empty').remove();
        if(nbr_filtered == 0) {
            container.after('<p class="wpupg-empty">No posts found on this page.</p>');
        }
    });

    You’ll have to replace “my-blog-posts” in “wpupg-grid-my-blog-posts” with the actual ID of your grid.

    Let me know if this works for you!

    Brecht

    Thread Starter Nick Lewis

    (@nickylew)

    Beautiful!

    Thats magic. Thanks! A little bit of styling and that will work great thank you.

    To be a little cheeky… Any ideas on the previous page/next page buttons..? ??

    Cheers

    Plugin Author Brecht

    (@brechtvds)

    Good to hear that’s working!
    I’m afraid the pagination thing is to require a bit more code. Will look into it for the next update though.

    Plugin Author Brecht

    (@brechtvds)

    Hi again,

    I wanted to let you know that we’ve just released WP Ultimate Post Grid 2.1 which includes the possibility to show a message when there are no items to display because of the filtering.

    Kind regards,
    Brecht

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘No items message for empty filters’ is closed to new replies.