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?
- 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.
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.
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.
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.
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.
Proceed to the Custom Query tab, enable the toggle and select the recently created 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.