• Need help,
    That part only works for logged in users, how to make it work with non logged in users?

    <div class=”page-header”>My Favorite Pictures</div>
    <div class=”entry-text”><?php wpfp_clear_list_link(); ?></div>
    <?php $favorite_post_ids = wpfp_get_user_meta() ?>
    <?php if ($favorite_post_ids):
    $favorite_post_ids = array_reverse($favorite_post_ids);
    $post_per_page = 20;
    $page = intval(get_query_var(‘paged’));
    query_posts(array(‘post__in’ => $favorite_post_ids, ‘posts_per_page’=> $post_per_page, ‘orderby’ => ‘post__in’, ‘paged’ => $page)); ?>
    <div id=”fave_posts_thumbnails”>
    <?php while ( have_posts() ) : the_post(); ?>
    <div class=”thumb-gallery”>” title=”<?php echo esc_attr( the_title_attribute() ); ?>”><?php the_post_thumbnail(thumbnail); ?>
    <div class=”remove-link”><?php wpfp_remove_favorite_link(get_the_ID());?></div></div>
    <?php endwhile; ?>
    </div>
    <div style=”clear:both;”></div>

    <?php if(function_exists(‘wp_pagenavi’)) { wp_pagenavi(); } else {
    $imageloc = get_bloginfo(‘template_directory’);
    next_posts_link( __( ‘<div class=”nav-previous”><img src=”‘ . $imageloc . ‘/images/next.png”></div>’, ‘thisis’ ) );
    previous_posts_link( __( ‘<div class=”nav-next”><img src=”‘ . $imageloc . ‘/images/previous.png”></div>’, ‘thisis’ ) );
    }
    wp_reset_query();
    else: ?>
    <div class=”entry-text”>
    <?php echo $wpfp_options[‘favorites_empty’]; ?>
    </div>;
    <?php endif; ?>

    </div>
    <?php wpfp_cookie_warning();
    wp_reset_postdata(); ?>

    http://wordpress.org/plugins/wp-favorite-posts/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How to show favorite posts with image for non logged in user?’ is closed to new replies.