cabrerahector / wordpress-popular-posts

WordPress Popular Posts - A highly customizable WordPress widget that displays your most popular posts.
https://wordpress.org/plugins/wordpress-popular-posts/
GNU General Public License v2.0
280 stars 83 forks source link

add support of multiple taxonomies filtering #224

Closed blackWhitePanda closed 4 years ago

blackWhitePanda commented 5 years ago

The code is added into my project a while. It works fine. Please consider to add the support of multiple taxonomies filter. One sample shortcode of update is: [wpp taxonomy='taxA;taxB' term_id='-19114,-2221;1024].

cabrerahector commented 5 years ago

Hi @blackWhitePanda,

Thanks for contributing!

I had a quick look at the code changes and I have at least one minor nitpick about your PR, but other than that it seems good. I'll run some tests and provide feedback as soon as possible.

blackWhitePanda commented 5 years ago

Got it. I will update the code on problem you raised. But I just wonder what the expected result for [wpp post_type="project" range="last24hours" taxonomy="tag" term_id="23"]? ( The filtering of tag would also discard? Or, filter project based on taxonomy "category"? )

cabrerahector commented 5 years ago

That is a good question. Currently -as you already know- the plugin falls back to using the category taxonomy but as I pointed out before this might result in unwanted/unexpected results. It might be better to not do any filtering at all if that's the case, however if you have a better suggestion please let me know.

blackWhitePanda commented 5 years ago

The latest logic would also discard taxonomy as fall back solution (for taxonomy invalid / non-exist case). Just see if it is ok~ Cheers.

cabrerahector commented 4 years ago

Alright, I'll have a look as soon as possible. I'm currently swamped with work so it might take a few days this time.