Support » Plugin: Members » How to make a list of blog posts filtered by user role

  • By using members plugin, I’m able to set read permissions for individual blog posts by user role.

    How can I create a list of blog posts, for example at the home page or at a seperate news page, where posts are filtered by user role? That is, creating a list with only blog posts visible that a certain user is allowed to see/read?

    Through my theme (Enfold), I’m able to create lists or grids with blog posts, filtered by categorie, tag, etc. However, it’s not possible to create such a list or grid filtered by user role.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Justin Tadlock

    (@greenshady)

    WordPress God

    I don’t know about your theme in particular, but it’s possible to custom code these queries. That’s quite a bit beyond basic support here at .ORG though.

    If you want to go with the pro support route, we should be able to help you. Or, if you theme has special circumstances, you may need someone to build something specifically for it. Feel free to shoot me an email with the details.

    Hi Justin, thnx for the reply mate!

    In my theme I can for example drag and drop a ‘blog posts’ element, which results in a list of titles of blog posts. Through the options of this element I can define which posts should be visible, by selecting categories or tags. However, there’s no option of selecting user role (and I didn’t expect that, to be honest).

    Now I’m just wondering: how do people that use your Members plugin, create news for members A, other news for members B, and public news? And protect the news from being visible for members of other groups?

    I would say (to answer my own question): assign a category to a blog post. And then make pages with blog posts of certain categories to make these visible for the related user roles.

    However, this way, a website administrator needs to assign both user role and related category per post.

    That’s a bit of a detour…

    It seems (easyer) possible through the Groups plugin, with an addon. See this video:
    https://www.itthinx.com/plugins/groups-restrict-categories/

    Do you know if the Members plugin and Groups plugin work together?

    Plugin Author Justin Tadlock

    (@greenshady)

    WordPress God

    Users, at least those using a standard theme, come to me with such requests sometimes. It’s usually relatively simple with a bit of code in their theme’s functions.php. Everyone’s exact needs are usually a little different though. And, I can’t say how that’d work out with a theme such as yours without getting into its code.

    As for the Groups + its add-on, I’d need to dive into the code of both. A video wouldn’t do any good. Assuming they both follow WordPress standards, they should work with Members.

    Hi Justin, thnx again mate!

    I’ll think about your suggestion of letting code a piece for functions.php

    In the meanwhile I try and see if there’s a kind of workaround that the site administrators can live with…

    I’ll get in touch with you when I need some custom coding 😉

    Btw: what plugin do you recommend for restricting access to files/media?

    This one?
    https://nl.wordpress.org/plugins/download-manager/

    Plugin Author Justin Tadlock

    (@greenshady)

    WordPress God

    Download Manager should be fine. I haven’t used it.

    Personally, I use Easy Digital Downloads, but that may be overkill for your project if you just need something basic.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.