Huseyin Berberoglu
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”.
Download
Latest version: Download WP Favorite Posts v1.5.6 [zip] (Downloaded 25427 times)
Donate
If you like this plugin show your appreciation and make a small donation.
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 in [wpfp-link] 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
{{wp-favorite-posts}}
text into content section. This page will contain users favorite posts. - That’s it :)
Changelog
For changelog go here.
WordPress Plugins
Shopping Cart
Your shopping cart is empty
Visit the shop

How to put do_shortcode in template?
Thx
is there a way to wrap a div tag with some sort of wp-favorite-post short code so that it will hide anythin in the div tag once you mark the post as favorite?
@spade, already wrapped with span tag.
@Huseyin Berberoglu.
Perhaps I should elaborate a bit better. I understand that its wrapped with the span tag, but what I like to do is use some sort of code such as the code so that when the post is marked as favorite it no longer shows up and is hidden. So is there two separate short codes… one for add to favorites and another to remove from favorites? This way I would be to have something like…
//this is where i would ad the post loop
//this would be blank so that nothing would show
Sorry. I’m not all that good at php so I hope I’m making some sense here.
@Huseyin Berberoglu.
Perhaps I should elaborate a bit better. I understand that its wrapped with the span tag, but what I like to do is use some sort of code such as the ?php if (function_exists(‘wpfp_link’)) { wpfp_link(); } ? code so that when the post is marked as favorite it no longer shows up and is hidden. So is there two separate short codes… one for add to favorites and another to remove from favorites? This way I would be to have something like…
?php if (function_exists(‘wpfp_link’)) { // post is not marked as favorite, then it would show the post ?
?php the_content(); ? //this is where i would ad the post loop
?php } else { // otherwise, hide post if marked as favorite ?
//this would be blank so that nothing would show
?php } ?
Sorry. I’m not all that good at php so I hope I’m making some sense here.
Hi,
I’m using this plugin with this theme:
http://wpclassipress.com/
But when I activate this plugin, a error occurs:
Fatal error: Cannot redeclare wpfp_widget_view() (previously declared in /home/xxx/xxx/wp-content/plugins/wp-favorite-posts/wp-favorite-posts.php:339) in /home/xxx/xxx/wp-content/plugins/wp-favorite-posts/wp-favorite-posts.php on line 339
hello, i user “wp-favorite-post” with plugin “use_parent_category_template_plus”, last plugin have only one file with this code:
cat_ID) {if ( file_exists(TEMPLATEPATH . "/category-" . $category->cat_ID . '.php') ) {
include(TEMPLATEPATH . "/category-" . $category->cat_ID . '.php');
exit;
}
$category = get_category($category->category_parent);
}
elseif (is_single()) :
$categories = get_the_category($post->ID);
if (count($categories)) foreach ( $categories as $category ) {
while ($category->cat_ID) {
if ( file_exists(TEMPLATEPATH . "/single-" . $category->cat_ID . '.php') ) {
include(TEMPLATEPATH . "/single-" . $category->cat_ID . '.php');
exit;
}
elseif ( file_exists(TEMPLATEPATH . "/category-" . $category->cat_ID . '.php') ) {
include(TEMPLATEPATH . "/category-" . $category->cat_ID . '.php');
exit;
}
$category = get_category($category->category_parent);
}
}
endif;
}
?>
and when “use_parent_category_template_plus” is activated your plugin not corrently worked – on click to link “add to favorite” he do not add the page in favorites, but he open new site window in text area!
what’s wrong?
sorry for my english )
“randy; i’m using plugin with php 5.2.12 and there is no problem. Which version of php are you use ? And which version you use of plugin ?”
Sorry for the tardy reply. I am using PHP 4 and just tried version 1.5. It downloads fine but when activate it I get this below. I am also using a classipress theme which someone else mentioned here. I am hosted with godaddy. Sometimes that is relevant.
Any ideas? Thanks.
“Fatal error: Cannot redeclare wpfp_widget_view() (previously declared in /home/content/n/e/w/newengland1/html/wp-content/plugins/wp-favorite-posts/wpfp-widgets.php:3) in /home/content/n/e/w/newengland1/html/wp-content/plugins/wp-favorite-posts/wpfp-widgets.php on line 3″
randy; maybe you wrote function wpfp_widget_view somewhere else ?
If you use linux server and have ssh account do this while you’re on wp-content;
grep -lir “function wpfp_widget_view” .
if it find two file you should remove one of them.
Hi, Thanks for the quick reply.
I didn’t write anything anywhere else. I downloaded through the WP dashboard/ add new plugin. When you click activate I get the error. I then went through my ftp to delete the plugin and it goes back to normal. I repeated the process but same result.
Is your advice relevant with this new info?
“If you use linux server and have ssh account do this while you’re on wp-content;
grep -lir “function wpfp_widget_view” .
if it find two file you should remove one of them.”
I do have a linux account
Not sure what grep – lir is?
Thank you.
Hi, great plugin. Just having one problem…. For some reason the is being populated with two identical from wp favorites and the result is it showing up as a bar across the top of the page. Can you take a look at the “Your Favorites” page on my site and let me know what you think?
anyway to modify this code so it picks up search results?
EX. (www.site.com/page?search=abc…etc…)
Hello Huseyin,
just tried out your plugin, it really works great. here are a couple of feature requests:
- BuddyPress compatible: would love to have an option, where a user could favorite a posts over all blogs (wpmu/wp multi) and these get shown on his profile at member/username/favposts for example.
you plugin is way better than the internal “fav” function where you cannot fav a post on the post itself!
thanks!
Hi Huseyin
I’m trying to implement some code you offered sometime ago for a different project I was working on, but with the new updates I’m not sure where to place the code. The code looks like this:
// start custom code for onefiftybyonefifty
global $post;
$post = $p;
get_the_image();
echo "";
$post = "";
// end custom code for onefiftybyonefifty
I’m trying to allow for images to appear in the “Your Favorites” page, since all the posts are images. You mentioned that I would have to delete this bit of code:
echo "id)."' title='". $p->post_title ."'>" . $p->post_title . " ";Is that still correct?
Thanks!
Thanks for the plug-in. It’s a really neat tool.
I don’t know if this is standard behaviour or not, but should the list of user favourites update when the user adds a new favourite? Currently on my installation, the page needs to be refreshed in order for the list to update.
I have inserted in a div on the sidebar. I’d like to see that list automatically update when the user favourites another post. Can you tell me if this is possible?
Many thanks.
Hi,
thx for the great plugin. Works like a charm. One question though. Is there a possibility to implement the favorite list into some kind of a contact form? I mean, as for example some user adds a few posts as favorites, he might send the list to his email address or maybe to some other user. Therefore it would be great if the fav-list could be send via any contact form implemented into the WP.
Maybe you have an idea how to manage that. If yes, I would be very thankful to hear from you.
Wish you all a nice day.
Cheers
Andy
Hey Huseyin, thanks for this great plugin, it’s really good.
I’m posting this comment for the following: I’d like to know if there’s a way to put the favorites icon star (or whatever icon) without the accompanying text. I tried removing the whole text and while it still shows the icon, it doesn’t have a link so it basically doesn’t work without it.
Thanks in advance for your answer, cheers.
I created a page and inserted {{wp-favorite-posts}}. When I click the remove link that appears there, that part of the page disappears instead of refreshing to show that the link has been to remove. I have to actually click the refresh button on my broswer to get the page back to normal. I didn’t have this problem with the previous version of your plugin.
Thank you so much brother…
Thumbnail is ok now, see my creation at idgems.com
Merhaba Hüseyin, çalışmaların harikulade ve dikkatle takip ediyorum. Senden bir şey istirham edicem bilmiyorum mümkün mü.
1) Eklentini kullanıyorum. Bir yazıyı kaç kişinin favori listesine eklediğini yazının başlığı altında (single.php’de) gösterebilir miyiz? (Ör. “Bu yazıyı X kişi favori listesine ekledi”)
2) Yazı gönderirken “ana_sayfa_resim” adında özel bir field oluşturup ana sayfada yazı özetinin hemen yanında yazıya ait bir resim koyuyorum. Şimdi sormak istediğim şu. Favori Listem adında bir sayfada kullanıcıların favoriye ekledikleri yazıyı görüntülüyorum. field ile oluşturduğum bu ana sayfadaki resimleri Favori Listem sayfasında da göstermek mümkün mü acaba? Öyle olursa şahane olur ciddi anlamda, hem yazı hem resim gayet şık durur.
Yanıtını heyecanla bekliyorum.. Çalışmalarını da gönülden destekliyorum.
Just wanted to say thanks to Huseyin for this great plugin and also his help in certain customizations. You can see his plugin at work at this css gallery http://www.siiimple.com – thanks again.
I think there is a bug in the Users Favorites widget. I cant change the name of the widgetbox
would be cool if this plugin would support buddypress!
Hi,
I’m trying to list the user’s favorites in the sidebar, but the limit doesn’t enter/register. For example, in the widget, I enter “5″ as limit of posts, and click “save”. It then disappears. Or, if I use the function directly, as in…
It shows all of them and not 5.
Can you help?
Hi,
when I use {{wp-favorite-posts}}. My favorites come above the rest that I use in a page.(text/images) I want to stick in between texts.
Thanks for your lovely plugin. It works like a charm.
Daniel
Hi,
I have wordpress 3.0 and installed the plugin but cannot change the name of the widget which I want to place in the sidebar. When saving the name of the widget, the name disappears. Is this a compatibility issue with 3.0?
Great plugin- Im having issues -with the shortcode.. it appears above my header like 4 times.. is there s php code I can use in template instead (to generate the page the lists all favs ?)
Im using this for posts,
How can i show how many times the post has been favorited?
and how can i show different user favorites in the author page?
Whenever I do a search on my website now this bit of code ( [wpfp-link] ) will appear before my search result – how can I get rid of it?
Hi Huseyin,
I have a special page that records the profile of my users’ details. Things like their posts, comments and etc.
I’d like to use your plugin to show the favourite post of a user based on his user id. How do I do that?
Right now the plugin shows the favourites of the current user. Because of this, when the current user goes to see the profile of others, he will see HIS favourites instead of that USER’s favourites.
Can you help?