Get posts by username = category?
-
Hello. First of all, I really like your plugin. So much easier to manage than some of the other ones out there.
I have a small question/request. I saw that you have already implemented “Get posts by username” which is kind of exactly what I want.
But in my system I prefer using a category instead of a custom meta key. Because categories are so much faster to manage in general. For example, one can just mass assign them in the post admin screen.
So at the moment your plugin checks for:
username1 == metakey1 = list postsI’d like it to be:
username1 == category_name1 = list postsDo you think you could add this as an option? Maybe a tick box to say that “Use category instead of meta key”?
Or can I somehow use the option for “Get posts with these categories” and enter the dynamic user_login there?
I’m using the same kind of functionality on my posts page so the user sees only those posts where a category matches their username with this kind of snippet:
if (in_array($user_login_name, $list_of_category_slugs, true) ...
But I’d like to list the posts also in a sidebar widget.
- The topic ‘Get posts by username = category?’ is closed to new replies.