- Favorite list is empty.
Your favorite posts saved to your browsers cookies. If you clear cookies also favorite posts will be deleted.
I made a plugin named as WP Favorite Posts. This plugin allows visitors to mark a post as favorite. There is no register requirement because this plugin saves data to cookies. Furthermore it can save data to database if user logged in. The user can see his/her favorite posts list from “Your Favorites” page which you created.
Don’t forget to donate
[paypal-donation purpose=”WP Favorite Posts” reference=”nxsn.com”]
Installation
It’s very easy;
- Download the WP Favorite Posts plugin.
- 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 index.php template file. Then favorite this post link will appear in all posts. - Create a page e.g. “Your Favorites” and insert
text into content section. This page will contain users favorite posts.
- That’s it :)
Widget
And there is a widget and template tag for listing most favorited posts. You can go widgets page for using widget. Template tag’s usage;
<h2>Most Favorited Posts</h2>
<?php wpfp_list_most_favorited(10); ?>
The parameter for limiting post count of list. Default value is 5 posts.
Bugs & Appreciations
You can report bugs or write your appreciations by using comments of this post. Also you can see the source code and the ChangeLog. Thanks for using my plugin!
New Feature Request or Need Modification
If you have a feature request or need modification which is urgent for you, contact me. We can make a deal.
Did you like plugin ?
If you like my plugin, i’ll appreciate it if you buy me a coffe or beer! I would love if you write a blog post/tweet etc about my plugin.
[paypal-donation purpose=”WP Favorite Posts” reference=”nxsn.com”]
Some Details
Show Link In Post Content
You can show Add/Remove Favorites Link into post wherever you want with writing Add to favorites
into post content while HTML mode.
Change Template Of “Your Favorites” Page
(version 1.4) You can change “your favorites” page’s templates easily.
First copy wpfp-page-template.php from plugin’s directory to your theme’s directory. Then make template changes (add thumbnail image, make what you want).
If you make something wrong just delete or rename wpfp-page-template.php from your theme’s directory and page’s view will be turn back to basic view.
Who Uses This Plugin ? (DEMO)
http://www.nefisyemektarifleri.com/tarif-defterim/
http://www.hdvideoclip.com/my-playlist
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?
@Ben it’s not easy or not possible to populate two plugin from one wp-favorite-posts. these errors are normal.
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.
@G01010; it’s not possible for now.
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
@Andy it’s possible. You can look that page for example; http://nhan.nxsn.com/?page_id=3
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.
@Janus; go to admin page wp-admin/options-general.php?page=wp-favorite-posts and try to remove “Text for add link”
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.
@Emir, evet gösterebilirsin. global $id; $count = wpfp_get_post_meta($id); gibi bir şey işini görür.
2. istediğin de mümkün. Bir örneği var; http://www.nefisyemektarifleri.com/tarif-defterim/
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.
@Justin thanks for using :)
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
@Daniel try to use [wp-favorite-posts]
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?
@Jan it’s a known bug. I’ll fix it when i find time.
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 ?)
@Jenell can you tell your page’s url
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?
@Santiage; you can use this for favorite count;
global $id;
$count = wpfp_get_post_meta($id);
you can not show different user’s favorites on another user’s 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?
@Isakndar; For now you can not show another user’s favorite but with another version I want to add this function.
which is the php code that would have to put instead of ((wp-favorite-posts)), to customize my page?
@manuel; use wpfp_list_favorite_posts()
Hello Huseyin – you have an awesome program in wp-favorite-posts. It is so great I want to put it everywhere on ibooknewzealand.com, even in the footer… I have tried ` `, and just `{{wp-favorite-posts}}` but neither work… Any ideas ? Regards, Alan
@Alan, thanks. Try to use [wp-favorite-posts]
Hello Huseyin – It’s ok the code is: ` `, Many thanks again, Alan
How bout a widget?
I dont have the automatic widget thing, I have to do it manually.
I put [wp-favorite-posts]
but it doesnt work.
So wat should i put?
@Santiago if you want widget, put that php code; wpfp_widget_view(array());
Amazing plugin you made, simple and clean like every plugin should be. Works fine with most templates only i’ve got a problem with mine, I use Classipress and when i active wp-favorite-posts i get this error.
Fatal error: Cannot redeclare wpfp_widget_view() (previously declared in ……/wp-content/plugins/wp-favorite-posts/wpfp-widgets.php:3)
I deleted the code from wpfp-widgets.php since i don’t need it. All works fine but i a’m wondering if this could cause errors in the future.