Support » Plugin: Private Content » Hide Phone Number

  • Resolved Matthew

    (@670571-1)


    Hello, I have a directory website of business listings. I would like to know if phone numbers of each listing can be shown only to the logged-in users or members with some specific privileges.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Aldo Latino

    (@aldolat)

    Hello,
    this is not the plugin for this purpose. In your case, you have to add a dedicated function in your system (your theme and/or plugin), something like:

    // Display phone number to logged in users.
    if ( is_user_logged_in() ) {
    echo $phone_number;
    }

    or this for Administrators:

    // Display phone number to Administrators only.
    if ( current_user_can( 'create_users' ) ) {
    echo $phone_number;
    }

    Best Regards.

    Matthew

    (@670571-1)

    Thanks you for the response.

    Plugin Author Aldo Latino

    (@aldolat)

    You are welcome!

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