If not logged in show popup for login
-
I have a question about how t use this plugin together with the Login With Ajax plugin.
I only want registered users to be able to add favorite posts. What I want to achieve is that if a users click on the “add to favorite” link when they are not logged in, the popup from Login with ajax will appear.
I have a feelin I have to use it in this piece of code of wp-favorite-posts.php:
function wpfp_add_favorite($post_id = "") { if ( empty($post_id) ) $post_id = $_REQUEST['postid']; if (wpfp_get_option('opt_only_registered') && !is_user_logged_in() ) { //this is not working: // -> echo do_shortcode('[lwa]'); OR // -> login_with_ajax('registration=1'); wpfp_die_or_go(wpfp_get_option('text_only_registered') ); return false; }
Hope somone can help me with this!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘If not logged in show popup for login’ is closed to new replies.