This topic has 6 replies, 3 voices, and was last updated 9 years by dintan.

  • Author
  • #81253
     dintan
    Participant

    I have some content which I wish to make available to ONLY logged in users. So I used the CONTENT BY USER TYPE in Visual Composer. However, the content remains hidden even for logged in users. Kindly refer to my attachment.

    I have searched the forum and below are some links I found, which none of them answer to my question:

    https://archived.seventhqueen.com/forums/search?bbp_search=content%20by%20user%20type –> not answered

    https://archived.seventhqueen.com/forums/topic/member-directory-page-about-me-text-does-not-display –> page not found

    https://archived.seventhqueen.com/forums/topic/user-type-can-see-certain-user-type –> page not found

     

    Thank you.

     

    Attachments:
    You must be logged in to view attached files.
    #81264
     sharmstr
    Moderator

    Go to /wp-content/k-elements/shortcodes/shortcodes.php and change the following line (around 1280) from this

    COPY CODE
    
    if ( is_user_logged_in() && $a['type'] == 'user')
    

    to this

    COPY CODE
    
    if ( is_user_logged_in() && $a['type'] == '')
    

    I’ll alert the developers to this.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #81265
     sharmstr
    Moderator

    Actually, I see that this has been fixed in the next update of k-elements. Instead of changing line 1280, change lines 1276 to 1278 from this

    COPY CODE
    
    $a = shortcode_atts( array(
                'type' => '',
            ), $atts );
    

    to this

    COPY CODE
    
    $a = shortcode_atts( array(
                'type' => 'user',
            ), $atts );
    

    I apologize for my confusion.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #81299
     dintan
    Participant

    Great, it works! Thank you 🙂

    #81301
     sharmstr
    Moderator

    Awesome. Again, sorry for the wrong info in the first response. Hadn’t had my coffee yet 🙂

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #81363
     Andrei
    Moderator

    This was already pushed into the K-Elements plugin for the next update. Thanks

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #81422
     dintan
    Participant

    No worries Sharmstr. Thank you guys 🙂

Viewing 7 posts - 1 through 7 (of 7 total)

The forum ‘Plugins questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?