• Resolved typofi

    (@typofi)


    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 posts

    I’d like it to be:
    username1 == category_name1 = list posts

    Do 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.

    • This topic was modified 4 years, 7 months ago by typofi.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Aldo Latino

    (@aldolat)

    Hello @typofi,
    first of all I am very sorry for the late reply.

    I think that I have correctly understood your request. If not, please let me know.

    I added a new option, just below the option “Get posts from current username”. This option simply switches from using a meta key to a category. I tested the modification and it seems to work fine.

    If you are comfortable with using a testing version, you can manually download it from here (the link will open a new tab) and manually install it.

    Before releasing the new version, I would like a feedback from you.

    Please, let me know.

    Thread Starter typofi

    (@typofi)

    Thank you so much! I will test this during the weekend and get back to you.

    Thread Starter typofi

    (@typofi)

    It works nicely! Thank you!

    But it only works with the basic settings.

    I tried using the option for “Do not ignore other parameters” and set “Get posts with this post status” to Private, and that doesn’t work. Then it just lists all the posts that are private.

    The same problem is if I mark “Get posts with this post status” to Any. Then it lists all the posts.

    Optimally, it would be great if these two options could be combined. So all the posts are private, but the logged in user sees a lists of posts that are designated to them through a category label.

    Plugin Author Aldo Latino

    (@aldolat)

    Try the new modified version. The link is the same.

    But I think that there is a problem. The function “Get posts from username” was developed for this purpose:

    1) I set up a widget that get posts in a certain way, for example “get posts with a certain category, with post status published”. The “published” post status is essential, because the posts must be seen by the visitors.

    2) In case a user is logged in, the widget will show different posts for him. The posts will be retrieved by meta key or by category (as you requested).

    Now, if you set up the post status “Private”, visitors will see “No posts yet”.

    But perhaps you are setting up the widget in a different way.

    Let me know, please.

    Thread Starter typofi

    (@typofi)

    Thank you so much! It works perfectly now!

    I basically a site which is completely private. All pages and posts are private. But the clients who log in have the capability to read_private_posts. And each client sees different posts designated with category tags.

    It has been quite difficult to set up, but your plugin has now made this much much easier!

    Plugin Author Aldo Latino

    (@aldolat)

    Ok, in the next upcoming days I will release the new version. ??

    Plugin Author Aldo Latino

    (@aldolat)

    Hi @typofi,
    I just released the new version 4.11.0.

    Thank you! ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Get posts by username = category?’ is closed to new replies.