Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
WordPress Plugins
View all Guides

How to Allow Users to Add Favorite Posts in WordPress

Last updated on by
Special WordPress Hosting offer for WPBeginner Readers
How to Allow Users to Add Favorite Posts in WordPress

Have you ever wanted to create a personalized experience for your users on your WordPress site? One way of doing this is by allowing them to have a personalized library or favorite posts area. Recently, while working on a membership site for a client, we found a need to create “personalized library” of videos for the users. This way, they can watch them again and again. It also allowed us to show them personalized results on a custom user dashboard which they saw when they logged in. In this article, we will show you how to allow users to add favorite posts in WordPress when they are logged in. We will also show you how to allow users to add favorite posts in WordPress when they are NOT logged in.

First thing you need to do is install and activate the plugin WP Favorite Posts (At the time of writing this, the plugin’s page says 50% of users say it is broken, but we have tested it out and it works).

This plugin allows users to add favorite posts. It uses cookies and database for saving data. If a user is logged in, then favorites data will be saved in database instead of cookies. If a user is NOT logged in, then the data will be saved in cookies.

Once you have activated the plugin, go to Settings » Favorite Posts. You will see a settings page like this:

WP Favorite Posts

Here you can select whether you want to have this for registered users only or not. You can select the image you want to show before the link. You can also choose to have Most Favorited Post Statistics enabled or not (Hint: you can use this in your sidebar to show Most Favorited Posts). You can also customize the labels which are pretty self explanatory.

Once you have saved all the settings, then simply add the following code in your theme files (single.php, page.php, index.php etc). Wherever you want to display the favorite option. Use the following code:

<?php if (function_exists('wpfp_link')) { wpfp_link(); } ?>

If you only want to allow the favorite post options on some pages, then you can use the short code, [wpfp-link].

If you want to display a page such as “My Library” or “Your Favorites” to create a personalized experience, then all you have to do is create a page and paste the following code: {{wp-favorite-posts}} and it will list all of user’s favorite posts.

We hope you like using this plugin. If you have any questions, then feel free to let us know.

Download WP Favorite Posts

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »


  1. WPBeginner Staff says:

    It can, but you will have to make some changes to the plugin which we don’t recommend/

  2. john says:

    Hello, is that the plugin works with pages ?

  3. jimario says:

    Will this also work with user profiles. For example, i want my site to allow some users to be able to view a list of other viewers profile pages. On those pages, they won’t be able to edit the other users’ profiles, but they will be able to favorite them–at least that’s what I’m trying to accomplish. Will your method work?

    • WPBeginner Support says:

      No, we think you are looking for something quite different this method will probably not work for that.

      • Seth says:

        What plugin do you recommend to get this feature? I tried “GD MyList” and “Favorites” plugins and neither gives the option to see other users lists.

  4. jimario says:

    Is it possible to have user profiles also saved as favorites? If I give access to users to view profiles of other users, I’d like those users to be able to Favorite any other user profile that they view using this plugin. is this possible using the method you described in your article?

  5. ALEXANDRA says:

    Hi, is there any way to create few sites for users, for example:
    – Add to favorites,
    -Add to currently reading,
    -Add to watchlist etc
    and create specific pages for all this options?

    • WPBeginner Support says:

      Yes it is possible to create profile pages with tabs where users can see their favorites, currently reading, watchlist, etc. However, if you want to do that we would recommend using a membership plugin.

  6. Ayush says:

    Nice plugin and tip brother, I installed it and worked super-fine.

    And i was wondering if there’s a way I can show what posts a particular user favorites in user’s profile, I mean a user can indeed see what posts he/she likes but is there a way a user can see what posts other user favorites ?

  7. Jane says:

    i just installed it and it worked fine :)

    I have one question. Is it possible when you show all your favorites that you get image of the article/item/blog you liked also? Orelse you have to remember it by the name.

    Then i would be sooo happy :D

    (i am newbie in wordpress, so i am not a geek on codes.. i hope its possible to install something so it just work?)

    • Editorial Staff says:

      Yes it is possible, but you would have to edit a few codes. wpfp-page-template.php << Look at this file in the plugin's folder. You would basically have to recreate this query in your custom page template. Sorry, it sounds a bit overwhelming, but that is what is needed.

      • Jane says:

        Ok – thanks for the reply. I have been looking for a nice theme where its already done, but with no luck. I am not good enough myself, when it comes to make coding from scratz.. :)

    • Cory says:

      I was able to show the content of my post by adding the_content to the template.

  8. Cory says:

    If you’re having issues with being able to favorite a post and it never shows in your favorites page, try this solution:

    worked perfectly for me!

  9. kenny says:

    This plugin is not functioning at all I installed it and activated it but my server respond with fatal error whoever is a developer of this plugin should get rid of it and stop putting low grades on WordPress awsome plugins.

  10. Abigail Gorton says:

    I think this is one of thoie plugins we could politely call ‘delicate’. It has an awesome features list and when it works it is just great but it is obviously NOT working on every theme / relaease / server and it is not playing nicely with other plugins.

    I really want this functionality. When I first installed it, it was up and running immmediately. When I tried to configure it a bit, it broke. When I uninstalled it, I found that the uninstall was not clean and complete – it was no longer showing in my admin panel, or through standard FTP, but when I did ‘show hidden files’ on FTP it showed up. This is so wrong – shoulda uninstalled when it claimed to form admin and should not be hidden.

    So I deleted the hidden files but when I reinstalled the plugin, some of my settings were still as configured which suggest I was not able to fully remove it form my server. So wrong.

    I have tried deleting and reinstalling multiple times and cannot get it back to clean.

    So I am one of the 50% for whom it does not work, which is a shame as it looke pretty good for the 5 minutes it was up on my site.

  11. Ubaidullah Butt says:

    When I used “{{wp-favorite-posts}}” for showing up all favorite posts on a page, There was nothing except “Clear Favorites” link. Can anybody help me with this. Thanks in advance.

    • Editorial Staff says:

      Did you favorite any post? If not, then do that first and the page will update itself.

      • Tito says:

        Hi, I’m currently have this problem and yup I’ve favorited numerous posts and still nothing. Any ideas? The support forum is all but dead unfortunately :(


        • Cory says:

          I have the same issue. Favorited a bunch of posts. they dont show in the favorites page. did you fix it?

    • Data says:

      Hoping this will help someone else having this same issue – as mentioned below, you have to have posts favorited already for the page to display anything.

      If you have marked something as a favorite and it isn’t showing up, it is likely because you are favoriting a page or custom post type, not a post of type “post.”
      If you want to favorite “page” types, or any other custom post type (ex: recipes on a cooking site), then you’ll need to make a simple edit to the wpfp-page-template.php file.
      Around line 23 you should see a comment on supporting other post types (page, custom types, etc.).
      Uncomment this line: $qry[‘post_type’] = array(‘post’,’page’);
      That should do it for adding “page” to the types allowed to be favorited.
      If you have other custom types you can add them to that array, or in place of something else, like:
      $qry[‘post_type’] = array(‘recipe’,’page’);

  12. Milan says:

    Thanks a lot. The post is very helpful.

  13. Guillermo Santiago says:

    The WP Favorite Posts plugin Sucks. It is also deprecated and not functioning properly with wordpress 3.2 up. Do your homework.

    • Editorial Staff says:

      The article was written in March. We have the plugin running on sites using 3.4.2 and it is working. Perhaps you should do your homework.

  14. Pranjal says:

    Though, it words good but that Gif loading image is continuously showing wherever, I had implemented. And also there’s no support from the developer of this plugin :(

  15. Jared says:

    I also used this plugin for a client project a few months back and it worked just fine – despite the voting.

  16. Kyle Suss says:

    Any idea if this works for custom post types?

    • wpbeginner says:

       @Kyle Suss Not sure if it does, but if it doesn’t, it wouldn’t be very hard to make that customization.

  17. frachmadin says:

    Hi, thanks for this great post. I am currently using GD Star Rating plugin on my blog. Do both have the same or different functions? I am interested to try using the WP Favorite Posts plugin. Thank you.

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.