Closed mattmilburn closed 6 years ago
Hi Matt!
That's odd. I use the latter form because I like it better but passing an string should work just the same. I'll have a look at it as soon as possible, thanks for the notice.
Hey Matt,
I just checked and this is what I got:
I get the exact same results when passing the parameters to the function using an array:
I ran this test on the Twenty Seventeen theme.
Okay I resolved my own issue. Sorry, this theme I’m working on had a custom plugin that was conflicting with the Popular Posts plugin. Once I deactivated the conflicting plugin, my code started working. Thanks for your help @cabrerahector! Sorry for the confusion! 🙃
Don't worry about it. I had the suspicion that it was something like that, it has happened in the past a couple of times.
Which plugin was causing the issue? I'd like to install it to find out what's going on and if possible add some preventive measures to keep it from messing up the plugin and/or ask its developer to fix whatever needs fixing.
It was actually a custom plugin from a previous developer on my project. Nothing public, just someone's fancy way of letting admins manage widgets and Popular Posts was one that had specific handling in place within the custom plugin. I just had no idea it was creating filters if Popular Posts plugin was installed. Luckily, I can just remove all of that custom code and handle my own implementation.
So no worries, someone did confusing things on a private project and we don't need to support them :)
Your wiki for this plugin demonstrates that the template tag should have the arguments passed in as a single query string. But this never worked for me and once I passed in all of the arguments in an array like the examples in WP admin will show, everything worked.
Or perhaps I'm misunderstanding? Anyway, just wanted to point that out. I just wasted a bunch of time discovering that on my own :)