List WordPress posts and documents in a table with 'Add to Favorites' buttons

WordPress Favorite Button Plugin

Today I'm going to tell you about a free plugin which adds Favorite buttons to your lists of WordPress posts, documents or custom post types. When used with our Posts Table or Document Library plugin, you can list WordPress content in a searchable table - complete with 'Add to Favorite' buttons.

  • Are you creating a WordPress video gallery and want people to select their favorite videos?
  • Do you have a WordPress blog and want people to choose their favorite posts?
  • Perhaps you're listing events in WordPress and want people to mark the ones they'd like to attend.

Whatever your reason for needing favourite buttons on your website, you can use these instructions to add them to any list of WordPress posts, documents, or any custom post type.

How the favorite buttons work

You can use one of our table plugins to list your WordPress content in a table. Then, you can use the Favorite plugin to add Favorite buttons. Your visitors can select their favorite posts or documents and create a handy shortlist.

When a visitor comes back to your website, they will still be able to see their selections. If they're not logged in then their favorites are stored via browser session or a cookie. If they have an account on your website, then their favorites will appear even if they re-visit from a different browser or device.

How to add Favorite buttons to WordPress

  1. First, use Posts Table Pro or Document Library Pro to list your WordPress posts, documents or any custom post type in a table view. Set up the plugin using the instructions in the knowledge base, with these settings:
    • Columns - include the 'content' column. The favorite button will appear here automatically.
    • Tick the 'Shortcodes' option. This makes sure the button appears in the table correctly.
  2. Now go to Plugins→ Add New in the WP Dashboard.
  3. Search for 'Favorites' and install the plugin by Kyle Phillips.

Now check the page where you've added the table. There will be a 'Favorite' button in the content column for each post or document in the table.

You can also add favorite buttons to other locations

The instructions above tell you how to add favorite buttons to the content/description columns the table. If you'd like to add them elsewhere - for example because you don't want this column in your table - then that's fine. Simply remove the content/description column and add the following shortcode to one of the other fields that you're displaying in the table (e.g. the excerpt or a text or Visual Editor custom field).

[favorite_button]

Where to get the plugins

Use the free Favorite plugin from wordpress.org with whichever Barn2 plugin works with the type of content you're adding:

21 Comments

  1. Favorites By Kyle Phillips - save favorites in the user's browser ?

    • Hi Igre, thank you for your comment. That plugin has the option to save the "favorites" as user meta info or to save it by session or cookie for logged-out users. For the best information about it, we recommend visiting their plugin page. If you have any questions about our plugins, you can reach us through our Support Center. Cheers!

  2. Hi Katie, how are you?
    I wanted a plugin to save to favorites (in the user's browser). I tried to search for this plugin but couldn't find it. Do you know if there is any plugin to do this?

    • Hi, Allan. WordPress favorites plugins usually work by allowing users to save the selected post or post type as a favorite for their own account on that particular website. I'm afraid we're not familiar with any plugin that would work to save a post as a browser favorite or bookmark (even after a search). It could be because what WordPress plugins can do is save favorites/bookmarks on the website itself rather than in the browser, which is outside the control of any website.

    • Hi Yarno, thank you for the comment. The tables can sort based on the Favorites. But since the Favorites buttons are placed inside custom fields, they cannot be used for the dropdown filters above the tables. If you are using Document Library Pro, you can look into using FacetWP to try and filter using Favorites. FacetWP works with custom fields created by ACF. If you have further questions, you can reach us through our Support Center. Cheers.

  3. Is anyone able to get this button to display on a video gallery?

    Here is my shortcode:
    [doc_library content="content:Watch Now,title,excerpt,doc_categories" column_breakpoints="all,all,all,none" widths="70,15,15,0"]  

    • Hi Kimberly, Thank you for the comment. The process and the approach would be the same no matter what type of content columns you have on your document table. If you are having trouble implementing it on your document library, please contact us through our support center. We'd be glad to help. Cheers!

  4. Can the user have multiple views of their favorites where they set the category for the view? For example, they favorite posts and want them to be on favorite lists that are for trips or cars or sports so when they come back they can see what they've favorited in each category?
    Or, would this categorization be based upon tags / categories associated with the posts / pages themselves (e.g. the post or page has a category or tag and then the favorite is another layer / filter)?
    I hope that makes sense!

    Chris

    • Hi, Chris. You can add/display/include a category filter dropdown list in either Posts Table Pro (see Posts table filters) or Document Library Pro (see Document library filters) to allow users to filter the table (i.e. show only relevant results) by selecting an item from the list. Displaying a category filter dropdown can allow users to set which category of favorited posts/documents to leave listed in the table. Please let me know if this addresses your concern. You can also send us a message via our Support Center to discuss on more detail. Thanks!

  5. I have the Favorites plugin and was wondering if it's possible to use your plugin for showing a table only with the user's favorite posts?

    • Hi, Marie. Thanks for your interest in our plugins. If you're looking into sort of a "favourites" option/feature on the table, we have a tutorial that shows you how to Add ‘Favorite’ Buttons to Your WordPress and WooCommerce Tables that you can check. However, the Favourite products will not be displayed on a separate table as the favorites plugin has its own way of displaying the favourites - either via custom coding or its own shortcode. For more information about how you can display your Favorites, you may refer to the following:

      https://en-gb.wordpress.org/plugins/favorites/
      under [user_favorites] at https://favoriteposts.com/.

      I hope this helps and points you in the right direction. Let me know if you have more questions/concerns. You may also reach us via our dedicated Support Center. Cheers!

      • Oh..! I like your way of displaying posts better! 😅 That's why I was looking to mix both of your plugins.
        I like that we can see everything in a neat table and it can be filtered by categories!! I'm not a developper so I haven't found how to do that with Favorites yet..

        • Thanks for your kind comment, Marie. The easiest way to find someone suitable who develops custom plugins is to post a job on Codeable where their pre-approved WordPress experts will send you a quote. We have partnered with them to provide plugin customization for our customers.

          Also, you can check the free Favorites plugin from wordpress.org as an alternative plugin that you can use. I hope this is helpful. Cheers!

  6. Hi,
    is it possible for the user to filter the post table by favorites?
    Regards Michael

    • Hi Michael,

      Thanks for your comment. I'm afraid that the plugin doesn't have this feature - thanks for the suggestion! I've added it to our feature request list and we will let you know if/when we add this to our plugin.

      Let me know if you have more questions/concerns. You may also reach us via our dedicated Support Center. Cheers!

  7. Hi,

    Here’s my thing... My posts have an ACF repeater field, which has 4 sub-fields (plain text type). Then the value of these sub-fields are listed in a frontend table, each set of repeated sub-field sets in a separate row. This all works fine, but I would like to have a like button on the end of each row. I know about the posts table pro solution, but that only lists separate posts. I basically would have to have multiple like buttons inside one post...is this possible to be achieved? Thanks!

    • Hi, David. Thanks for asking and my apologies for the late reply.

      For what you describe to be possible, the like/favorite/wishlist plugin that you use must be able to provide/display a Like button for each ACF repeater field sub-field's value. This requires either an integration between those two plugins, or a customization or bespoke feature via custom code, which I hope you'll understand is a developer-level task. If you don't have a developer who can do this for you, then I recommend that you post a job on Codeable where their pre-approved WordPress experts will send you a quote.

      Otherwise, the alternative is to list/display these as separate posts or products, as mentioned.

      Should you have any other questions, please let us know via our Support Center so that we can get back to you much sooner. Thanks!

  8. can this be added to galleries ... specifically to photo galleries? I'm also interested in knowing what the output is ... for example does the web site admin get a report of liked images by user? is there perhaps a list or something that visitors can pull up at a later time to see what they liked / saved on their previous visits?

Please share your thoughts...

Your email address will not be published. Required fields are marked *