Skip to content

Instantly share code, notes, and snippets.

@kylephillips
Created August 17, 2015 18:05
Show Gist options
  • Save kylephillips/13933d20067a0cb255f3 to your computer and use it in GitHub Desktop.
Save kylephillips/13933d20067a0cb255f3 to your computer and use it in GitHub Desktop.
Show Favorites Button only for logged users
<?php
if ( is_user_logged_in() ) :
the_favorites_button();
else :
// Place any logged-out messaging/JS here
?>
<p>Please log in to save favorites</p>
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment