Support » Plugin: Restrict User Access - Membership Plugin with Force » Restricting Custom Fields inside PHP template

  • Resolved luckydays

    (@luckydays)


    Hi Joachim.

    Seems your plugin is really exactly what I was looking for!
    Thank you for it.

    Could you assist me with the following, please?

    We need to restrict access to separate custom fields (created with Advanced Custom Fields plugin) which are been displayed on the page through the ACF PHP snippet.
    For instance, we need to restrict access to the ‘Address’ field, which is displaying with this part of the code:

    $map_location = get_field( 'google_map' );
    echo $map_location['address'];

    The question is how could we exactly implement the shortcode which you were referring to in your post, in order to be able to show ‘Tease & Include’?

    Looking forward to your reply.

    Best wishes,
    Paul

    • This topic was modified 2 years, 2 months ago by luckydays.
Viewing 1 replies (of 1 total)
  • Plugin Author Joachim Jensen

    (@intoxstudio)

    Great that you found the other post 🙂

    Currently shortcodes do not work with the “Tease & Include” action, but there is a parameter you can use to display content to unauthorized users.

    [restrict level=”level” page=”id”]
    Only users with the specified level can see this text. All other users will se content from the page with the specified id.
    [/restrict]

    Let me know if this answers your question!

Viewing 1 replies (of 1 total)
  • The topic ‘Restricting Custom Fields inside PHP template’ is closed to new replies.