WordPress.org

Support

Support » Plugins and Hacks » WP Favorite Posts » [Resolved] View favorite posts of an user

[Resolved] View favorite posts of an user

Viewing 1 replies (of 1 total)
  • Working code is:

    <?php
    $curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author)); ?>
    
    <?php $user_favs = wpfp_get_users_favorites($curauth->display_name); ?>
    <?php
    if(!$user_favs) { echo "No favorites yet."; } else{
    	?>
        <ul><?php
    foreach ($user_favs as $user_fav)
      {
    echo "<li><a href='".get_permalink($user_fav)."' title='". get_the_title($user_fav) ."'>" . get_the_title($user_fav) . "</a></li>";
      };?></ul><?php }?>

    Cheers.

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] View favorite posts of an user’ is closed to new replies.
Skip to toolbar