Support » Plugin: Members » Can I restrict Custom Fields (Pods) on Post?

  • Hello,

    I just wonder if Members can help me with this requirement:

    Hide certain area of a post, page or custom-post-type
    – such as certain Custom-Fields or Pods Fields –
    from showing to any unregistered website visitor.

    The visitor should be able to see the standard content and images, but custom fields should only be displayed to registered users.

    Is this possible with Members?

    Thank you and have a nice day,

Viewing 6 replies - 1 through 6 (of 6 total)
  • You can wrap the output that you want to protect with one of the Members shortcodes (, down the page is the section on shortcodes), so you can do:

    [members_access role="paid_members"]
    content you want to restrict

    But if you’re trying to restrict fields on ‘input’, ie in the back-end admin, you can control that with the Advanced Options of the field where in Pods there is a section to Restrict the fields Visibility based on Role or Capability.

    • This reply was modified 7 months, 3 weeks ago by  Jim True.

    Thank you Jim,

    I’m impressed about your effort to reply to support-requests even in other forums than Pods, nice one 🙂

    So, in case of using the wrapping-solution I’d simply need to place the appropriate Pods-Template inside the [member_access] tags, e.g.

    [members_access role=”paid_members”]
    [pods name=”pods_test” template=”pods_test_template”]

    is that correct?

    Thank you and kind regards,

    Yep, that should work just fine. I use that same methodology but I put the members_access shortcodes actually inside my Pods Templates. That way I show general information to non members and members see additional stuff. It’s very flexible.

    Plugin Author Justin Tadlock


    If working with shortcodes, there’s also a [members_logged_in] shortcode that works the same way but only displays content to users who are logged into the site.

    [members_logged_in]Only show to logged-in users.[/members_logged_in]

    If within templates (not using shortcodes), you don’t even need Members. You can do:

    <?php if ( is_user_logged_in() ) : ?>
    	Only show to logged-in users.
    <?php endif ?>

    @greenshady You’re awesome! I use your plugin practically on every site I build 😉

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Can I restrict Custom Fields (Pods) on Post?’ is closed to new replies.