Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    to allow only administrators to see the contact details you can change in the code from the linked topic the !current_user_can( "read" ) to !current_user_can( "edit_pages" ).

    In order to encourage users to contact the administrator to get the details you can change the function loggedin_members_only() to look like this

    
    function loggedin_members_only( $post_id ) {
        $flash = array( "error" => array(), "info" => array(), "warn" => array() );
        $flash["info"][] = array(
            "message" => __( "Contact the admin at [email]." ),
            "icon" => "adverts-icon-block"
        );
        adverts_flash( $flash );
    }
    

    Hope this helps.

    Thread Starter stanxxx

    (@stanxxx)

    Hello, thank you for your reply!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Allow only admins to see contact details’ is closed to new replies.