Hide buttons for not-logged-in
-
I’m building a site for a community. They have events that members (logged-in users) can book.
As a teaser, 3 upcoming events are listed on the front page.
Now, i want the NOT logged in users not to be able to see more info, book or anything.
Events for logged-out users just an advert realy, nothing more.
In practice that means: making the “Book now” and “More Info” buttons invisible and disable the link for the titleCould it be done? With somthing like:
<?php if ( is_user_logged_in() ) { body_class('logged-in'); } else { body_class('logged-out'); } ?>
And than CSS hide buttons
.logged-in{whatever;}
.logged-out{whatever;}The title of a event is also clickable. How to disable that for not-logged-in users?
Any tip would be welcome.
Thanks in advance, MarcoThe page I need help with: [log in to see the link]
- The topic ‘Hide buttons for not-logged-in’ is closed to new replies.