WordPress.org

Forums

s2Member Framework (Member Roles, Capabilities, Membership, PayPal Members)
[resolved] Create a custom link using ccaps (5 posts)

  1. ElPiwai
    Member
    Posted 1 year ago #

    Hi,
    I'd like to add a link on a page that use the current user ccaps.
    The idea is to give access to my members to 2 pages:
    - mydomain.com/username
    - mydomain.com/userscompany

    I've managed to create the first link by using [s2Get constant="S2MEMBER_CURRENT_USER_LOGIN" /], but I can't figure how to use ccaps to create the other one.

    https://wordpress.org/plugins/s2member/

  2. Cristian Lavaque
    Member
    Plugin Contributor

    Posted 1 year ago #

    Is "userscompany" the ID of a custom profile field you created with s2Member? WP Admin -> s2Member -> General -> Registration/Profile Fields

    If so, you could try this one: [s2Get user_field="userscompany" /]

  3. ElPiwai
    Member
    Posted 1 year ago #

    That perfectly did the job.
    Thanks again.

  4. ElPiwai
    Member
    Posted 1 year ago #

    Another question that might help me.
    Assuming each user has only one custom capability, how about a link looking like
    mydomain.com/current_user_ccap/

  5. Cristian Lavaque
    Member
    Plugin Contributor

    Posted 1 year ago #

    I'm not sure I understand that question... what exactly are you trying to do there and how?

    Not sure if it's related, but maybe... https://www.youtube.com/watch?v=BBltDUopo1U

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags