Show User’s Liked Posts in Bricks with WP ULike

This Pro tutorial shows how posts liked by the currently logged in user via WP ULike can be shown on a Page in Bricks.

Step 1

Install and activate WP ULike.

By default, the plugin will be active for the post post type. To change this, go to the Content Types tab in the plugin's settings page and select your desired post types in the "Post Types Filter" field.

While there you can change the appearance of the like button and any others settings as needed.

Step 2

The default button position on single posts is after the content.

You may want to add a top margin to space it out a bit.

Edit your single post template with Bricks and add this at Settings (gear icon) → PAGE SETTINGS → CUSTOM CODE → Custom CSS:

.wpulike {
	margin-top: 2em;

Step 3

View a few posts on the frontend and like them so we have some data for testing.

Create a Page called "My Profile" or "My Content" for showing the posts that the user has liked.

Add a Section and inside its Container Posts element or set up a Query Loop.

Use the query icon to select your post type. If this is for the built-in post post type, there is no need to make any changes since it is the default in Bricks.

If you'd like to add the like button in the loop, add this shortcode:


Step 4

Let's filter the posts from the above to only those that the current user has liked.

Add this in child theme's functions.php or a code snippets plugin:

This is a BricksLabs Pro tutorial.

For full access login below or create your BricksLabs Pro account

Instant access to 390+ Bricks code tutorials with BricksLabs Pro