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

    (@brechtvds)

    Hi there,

    At the moment you’d have to use some custom code for that. What would be the use case?

    Brecht

    Thread Starter clb2196

    (@clb2196)

    The main thing is for the States filter, we’d like to have all states show just to be cohesive, and because it’s being used with deep linking from a clikckable map. I’m fine with custom code- I did make sure to add the show empty = true to those sorting methods you wrote for me.

    Plugin Author Brecht

    (@brechtvds)

    Right now you could use the wpupg_grid_cache_filter plugin hook, but you’d have to generate the entire filter HTML yourself, basically, so that requires quite a bit of custom code.

    If that’s an option you can take a look at the /helpers/grid_cache.php file and see how it’s generated there.

    I’ll look into an easier solution for one of our next updates.

    Brecht

    Thread Starter clb2196

    (@clb2196)

    Ah, I looked at the code- so are you looping over the posts and grabbing the terms that way? That makes sense then. Hm. Probably not worth a code workaround for now. I’ll keep an eye out for updates!

    Plugin Author Brecht

    (@brechtvds)

    Yes, we only want to display terms that are actually associated with the posts that are shown in the grid, which is why we do it this way.

    We can’t just use the “hide_empty” parameter because you can limit the posts in the grid by category, for example.

    Brecht

    Thread Starter clb2196

    (@clb2196)

    I’m trying to brainstorm some ways to handle this still. The main concern is we are starting from a map. So if someone clicks, say, CT, and there are no listings that have the CT term, it instead shows all the results, which could be confusing. Is there any way to force the deep link to show a “no results” message? I’ve been looking at the javascript but figured I’d see if you had some thoughts.

    Plugin Author Brecht

    (@brechtvds)

    How do you have it set up exactly? Can you give me a link so I can take a look?

    Brecht

    Thread Starter clb2196

    (@clb2196)

    Sure- I don’t have a lot of listings set up yet but you can get the idea of the setup: http://pursuitcommunity.com/gold-star-collective/
    Thanks!

    Plugin Author Brecht

    (@brechtvds)

    The deeplinking basically simulates a click on the appropriate filter term. If that term does not appear in the filter it doesn’t have anything to click so it’s basically ignored.

    I’ll try adding the option to show all terms (even empty ones) in the next update.

    Brecht

    Plugin Author Brecht

    (@brechtvds)

    Hi again,

    I wanted to let you know that we’ve just released WP Ultimate Post Grid 2.2 which includes a new option to display empty terms in your filters.

    Kind regards,
    Brecht

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Show empty?’ is closed to new replies.