• Hello,

    First of all, thanks for making this awesome lightweight plugin! Is there a way to add a Favorite button to each post for the following function?:

    // Function to display user favorite list
    the_user_favorites_list($user_id = null, $site_id = null, $include_links = false, $filters = null);

    Thanks!

    https://www.ads-software.com/plugins/favorites/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hey i’m looking for very similar thing.
    I would like to add a button to each line to give delete capacity.

    this what i use :

    /************************************************
     Retourne la liste HTML des favoris pour l'utilisateur courant
    ************************************************/
    function getDownloadFavoritesList()
    	{
    
    		// recupere la list des posts marqué comme favoris
    		$posts_id = get_user_favorites($user_id = null, $site_id = null, $filters = null);
    
    		$out = '<ul class="">';
    		// boucle la liste des posts
    		foreach($posts_id as $post_id){
    				$out .= '<li> <a href="' . get_permalink($post_id) . '">'.get_the_title($post_id).'</a> <a href="#">X</a></li>';
    		}
    		$out .= '</ul>';
    
    		echo $out;
    	}

    But i didn’t find how attach delete action on the link X

    then i call it from templete by :

    getDownloadFavoritesList();

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Display Favorites btn beside each favorited post’ is closed to new replies.