Your favorite posts saved to your browsers cookies. If you clear cookies also favorite posts will be deleted.
Allows users to add favorite posts. This plugin use cookies and database for
saving data.
- If a user logged in then favorites data will saved in database instead of cookies.
- If user not logged in data will saved in cookies.
You can choose “only registered users can favorite a post” option, if you want.
Also there is a widget named “Most Favorited Posts”. And you can use this template
tag for listing most favorited posts;
Most Favorited Posts
If you use WP Super Cache you must add page (which you show favorites) URI to “Accepted Filenames &
Rejected URIs”.
If you need support create a topic on support forum
Please submit your pull requests to https://github.com/hberberoglu/wp-favorite-posts
Download
Latest version: Download WP Favorite Posts v1.6.8 [zip] (Downloaded times)
Donate
If you like this plugin show your appreciation and make a small donation.
[paypal-donation purpose=”WordPress Plugin” reference=”nxsn.com”]
Installation
- Unzip into your
/wp-content/plugins/
directory. - Activate the plugin through the ‘Plugins’ menu in WordPress
- Place
<?php if (function_exists('wpfp_link')) { wpfp_link(); } ?>
in your
single.php or page.php template file. Then favorite this post link will appear in all posts. - OR if you DO NOT want the favorite link to appear in every post/page, DO NOT
use the code above. Just type inAdd to favorites into the selected post/page
content and it will embed the print link into that post/page only. - Create a page e.g. “Your Favorites” and insert
text into content section. This page will contain users favorite posts. - That’s it 🙂
Changelog
For changelog go here.
love the plugin but desperately need pagination for the page that lists the favorite posts. any chance someone can post sample code??
@pirco; last version has pagination.
You have a huge bug: if I open in a new tag the link from “add to favorites” ?pfpaction=add&postid=xxx” it will insert a +1 in the favs stats. Even certain search engine robots can do this and you end up in having a lot of favs that are not real!
The bug comes first from the function wpfp_do_add_to_list($post_id) . You check wpfp_check_favorited if is already favorited and you return TRUE. Then you use if(wpfp_do_add_to_list) which says TRUE even if it has been already added to favorited by the user. The sollution is to return FALSE in
if (wpfp_check_favorited($post_id))
return false;
This is only one solution but you need to check the code because even not logged in users can add to favorite even if you allow only logged in ones.
I made a function that allows to show how many favs a post has and which users favorited that post. I even check in phpmyadmin and it is clear to me that the plugin inserts “fake” stats. Please solve this issue.
Thanks a lot
@Marian; you’re right. I applied your solution. Thanks a lot!
Hi Huseyin,
after updating your plugin it seems to conflict with the FA light slider plugin. http://wordpress.org/extend/plugins/featured-articles-lite/
It’s a kind of weired but the content (images, excerpts, etc) of the slider I have on my main page appears on the favorites page unformatted. Further the content overlapps the list of favorites and even my footer.
How should I deal with this?
Thanks & happy new year?
Boris
I discovered the problem!
For any reason I have to uncheck a slider setting to automatically display the slider on my homepage.
Now everything works fine.
Hi, Marian. & Huseyin
had same issue..
I solved it by rewriting code in plugin to block out some search engines from favoriting.
I used something like this.
/* if server host contains eg. search.msn.com die */
$badbot = $_SERVER['REMOTE_HOST'];
$badagent = $_SERVER['HTTP_USER_AGENT'];
$badots= "search.msn.com , net.ua , softlayer.com , Spider , Sitesucker , google , GSiteCrawler ";
if( stristr ( $badbot , $badots) || stristr ( $badagent , $badots) || !isset($_COOKIE["visit"]) ) {
wpfp_die_or_go("ERROR or Javascript required"); } else {
wpfp_add_favorite() ;
}
Are you saying now this issue is resolved with latest update and I can update and remove this block now ?
forgot to check nofity box…
Thanks for mentioning this bug, Marian. I have noticed fake stats, too, and had to remove the widget because of it. Perhaps this update will fix it. What is strange in my case is that I’m using the plugin as an “Add to Wishlist” function for my book review site but the most added posts are actually not the book reviews, but one particular category of posts that is not book reviews. According to the statistics, hundreds of people are adding these old posts from this category and I know that’s not right because the category is old outdated discussions with book giveaways — not at all what people would add to a wishlist.
I really like the plugin as a wishlist for readers, but I really wish the stats would work correctly and hope this will fix it. Thanks for your work, Huseyin!
Great plugin! Congratulations!
Thanks for great plugin :) i hope that it works! greetings from Latvia :)
Thanks for your work on this plugin. With help from the support forum we have been able to customise this plugin to exactly match our site’s needs.
Is there a way I can hire you to fix the plugin? I use WP-Cache on my site and people are saying that some days they go there and their favorites list is someone elses and other times it’s blank. I have people using it 24/7 so I don’t want to get rid of it. I had someone do some customization to it that you also might like and I am glad to let you see the code for that as well if you can fix my problem.
This is what it looks like on my site http://sweetiessweeps.com/your-sweeps-list
Sorry, I mean I use W3 Total Cache