Favorites in Bricks

Updated on 1 Apr 2024

This Pro tutorial provides the steps to add a Favorite button for each post in the posts list on the posts page (can be any/all archive page/s) and a "My Favorite" Page where the currently logged-in user can see the posts that he/she has favorited when using the Favorites plugin in a Bricks site.

Posts page (blog posts index):

My Favorites Page:

We will also display a message that reads "You are either not logged-in or do not have any posts favorited yet." instead when the currently logged-in user either does not have any favorite posts or if a non logged-in visitor is viewing the page.

Note: The plugin also has support for anonymous users i.e., those that are not logged-in.

Step 1

Install and activate Favourites plugin.

In the plugin's settings uncheck "Output Plugin CSS" and save changes.

In the "Display & Post Types" tab, enable the plugin for your desired post types. Posts are selected by default.

Button Type: Custom Markup

Unfavorited button markup:

This is a BricksLabs Pro tutorial.

For full access login below or create your BricksLabs Pro account

Get access to all 526 Bricks code tutorials with BricksLabs Pro

Related Tutorials..

Bricks single mode – Limiting the number of posts to 1 in the editor

Bricks single mode – Limiting the number of posts to 1 in the editor

Creating a "Single Mode" for Bricks query loops to make sure only one post is rendered in the builder.