What's new

Welcome to ServerProofs

Join us now to get access to all our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, and so, so much more. It's also quick and totally free, so what are you waiting for?

Check user is login or not - adding PHP and CSS into function.php

AR

Administrator
Staff member
Joined
Sep 15, 2021
Messages
186
Reaction score
1
Points
18
add_action('wp_head', 'add_css_head'); function add_css_head() { if ( is_user_logged_in() ) { ?> <style> </style> <?php } else { ?> <style> .edd_price{ display: none; } </style> <?php } }
 

Top resources

Top Bottom