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…
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
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?
Hi!
You can try using a plugin like this one – https://wordpress.org/plugins/wp-conditional-content/
Regards,
Yigit
Actually, used your idea of classes, but inserted a jquery .remove() ;)
Thanks Yigit!