Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #352627

    I’m creating some pages that will need to have different content if the user is logged in or not.
    Actually,It’s just part of the content:
    If the user is logged in, some texts, post lists and buttons must show.
    If the user is not logged in, only 2 buttons (Login and Register) must be seen.

    Is there any way to do that using Avia Template Builder? So it gets easy to my client to update that content?

    I was thinking about creating 2 different pages (one to logged in, another to logged off), but my client will have dozens of those pages, and I think that it might get a little messy to maintain that over time…

    #352975

    Hey scaico!

    Please turn on custom CSS field for ALB elements ( http://kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/ ) and give your elements a custom CSS code and then add following code to Quick CSS in Enfold theme options under General Styling tab

    .logged-in .your-custom-class { display: block !important; }
    .your-custom-class { display: none; }

    Cheers!
    Yigit

    #353042

    Hey Yigit!

    This solutions works, but just partially… The .logged-in content must be really protected.
    Using this solution, a simple firebug inspection or even opening the source code would reveal the links and other stuff that should be really visible only if logged in…

    Is there any other way to work around this?

    #353050

    Hi!

    You can try using a plugin like this one – https://wordpress.org/plugins/wp-conditional-content/

    Regards,
    Yigit

    #353092

    Actually, used your idea of classes, but inserted a jquery .remove() ;)

    Thanks Yigit!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Change content if user is logged in’ is closed to new replies.