Stand with Ukraine. Fight for freedom and democracy

Donate
Troubleshooting //
Displaying Public Favorites List on the User Profile Page

Displaying Public Favorites List on the User Profile Page

Question

Lastly, the favorite list is only shown to a specific user on their page. Is it possible to display each user list on the front end? So that guests can view a list of different user profiles and what they have saved in their lists. How can I set it up?

Answer

Tutorial requirements:

  • JetEngine plugin;
  • A created User Profile Page;
  • Public User Meta Stores add-on installed and activated. Download it from the Free DevTools Kit page and upload it to the Plugins tab on the WordPress Dashboard;
  • Elementor or Gutenberg (block) editor;
  • A created Favorite Page. Ensure that the Data Store has the “User Metadata” Store type.
user metadata

In this tutorial, I’ll describe how to display the publicly visible favorites list on the user profile page.

Create a Query

Go to the JetEngine > Query Builder tab on the WordPress Dashboard and hit the “Add New” button.

Select the appropriate Query Type according to the type of items that users can add to the favorites list. For example, I selected the “Posts Query” option.

query general settings

Navigate to the Post & Page tab, push the macros trigger near the Post In field, and pick the “Public User Meta Stores: Get Store” macro. Select Meta Store and choose the “Queried user” Context.

Press the “Apply” and “Add/Update Query” buttons.

public user meta stores macro

Add the Listing Grid to the User Profile Page

Open the page set as the Single User Page in JetEngine Profile Builder in the Elementor or Gutenberg editor.

jetengine profile builder

Drag-n-drop the Listing Grid widget or block here, and select the Listing of the favorites items to be displayed on the user profile page.

jetengine listing grid

Proceed to the Custom Query tab, enable the toggle and select the recently created query.

NOTE!
Be aware that you cannot use several query types in one Listing Grid. For example, if you use the Custom Query, you can not set query settings in the Posts Query tab. If you already apply some, you’d better set the needed settings while custom query creation in the Query Builder module.
custom query

When you finish, hit the “Update” button.

Navigate to the front end and check the profile pages of different users to ensure that the query works appropriately.

user with favorite posts
Was this article helpful?
YesNo
Still need help?
Submit a request