Creating Your First Post Selection
Create a Post Selection to display a set of posts or CPT items according to the selected Layout.
Step by step guide
Note: First create a Layout that you'll assign to your Post Selection below.
Visit the Advanced Views tab in the WordPress backend.
Switch to the Post Selections tab.
Create a New Post Selection
Click on the Add New button.
Enter a Name for your Post Selection.
Note: If you don't give your Post Selection a Name then you can't publish your Post Selection and the publish button will be disabled.
Assign a Layout
In the Item Layout dropdown, select your Layout to assign it to the Post Selection.
Select the Source - 'Posts Query (WP_query)' will get posts based on the defined query, while 'Page Context (archive pages)' will get posts from where the Post Selection shortcode is inserted (e.g. archive, author or category).
In the Post Type dropdown, choose the post type to filter by that post type.
Filter and Sort
In the Post Status, add one or more items from the list.
Use the Maximum number of posts field to limit the amount of items shown.
For the Sort by dropdown, sort posts by date by selecting ‘Date’ from the list. (In Pro you can sort by Meta field)
Choose Ascending or Descending for Sort order.
Advanced settings
Switch to the Advanced tab.
Give your Post Selection a description (only seen on the Admin Post Selections list).
Customize the 'No Posts Found Message' if needed.
In the Pool of posts dropdown you can manually select posts to limit the query to those posts only. Leave empty for the query to consider all items as per General tab.
For the Exclude posts you can manually exclude posts from your Post Selections.
Warning: Don’t use Exclude posts together with Pool of posts as it could give unexpected results or no results.
Template Engine
Optionally change the template engine from Twig to Blade (requires PHP 8.2).
Publish your Post Selection
Click on Publish to save and publish your Post Selection.
Copy the shortcode into place
Copy the generated shortcode of your Post Selection sidebar.
Paste the shortcode in your page, post or theme section.
View the page to see the results.
Note: Restrict visibility of Post Selections by using user-with-roles="ROLE1,ROLE2" user-without-roles="ROLE1,ROLE2" shortcode arguments.
Note: Do you want to customize a query (WP_Query) that is used to get Post Selection, but the option is missing in the interface? You can do this using our filters. Read more here
Last updated