How to show a module only to logged in wordpress.com users?
-
Can someone please tell me, if possible of course, how to show JetPack module code only to logged in wordpress.com users?
Can I just use
is_user_logged_in()
for this?So for example:
if ( class_exists( 'Jetpack_Likes' ) && is_user_logged_in() ) { $custom_likes = new Jetpack_Likes; echo $custom_likes->post_likes( '' ); }
The JetPack modules are really code heavy, so I’d like to show them only to visitors who are logged in.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to show a module only to logged in wordpress.com users?’ is closed to new replies.