17th Oct '22
/
6 comments

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 610 Bricks code tutorials with BricksLabs Pro

Related Tutorials..

Pro
Previous Two Posts in Bricks Query Loop

Previous Two Posts in Bricks Query Loop

This Pro tutorial shows how we can modify the parameters of a Bricks query to limit the posts to the previous two whilst cycling to…
Pro
Posts Grouped by Authors in Bricks

Posts Grouped by Authors in Bricks

This Pro tutorial for Bricks users provides the steps to loop through users and inside that, through posts whilst setting the inner query's author parameter…