Creating Your First Card
Create a Card to display a set of posts or CPT items and their fields.
Last updated
Create a Card to display a set of posts or CPT items and their fields.
Last updated
Note: First create a View that you'll assign to your Card below.
Visit the Advanced Views Framework tab in the WordPress backend.
Switch to the Cards tab.
Click on the Add New button.
Enter a Name for your Card.
Note: If you don't give your Card a Name then you can't publish your Card and the publish button will be disabled.
In the View dropdown, select your View to assign it to the Card.
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 Card is inserted (e.g. archive, author or category).
In the Post Type dropdown, choose the post type to filter by that type.
In the Post Status dropdown, add one or more items from the list.
Use 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.
Switch to the Advanced tab.
Give your Card a description (only seen on the Cards list).
Fill out the 'No Posts Found Message' if needed.
In the Pool of posts dropdown you can manually select posts to include.
Note: This will then ONLY show the selected posts.
For Exclude posts you can manually exclude posts from your Card.
Warning: Don’t use together with Pool of posts.
Optionally change the template engine from Twig to Blade (requires PHP 8.2).
Click on Publish to save and publish your Card.
Copy the shortcode of your Card from the sidebar.
Paste the shortcode in your page, post or theme section.
Visit the page to see the results.
Note: Adding new fields to your assigned View will automatically include those fields in your Card without you having to copy the shortcode into place again.
Note: Restrict visibility of a Card 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 posts for a Card, but the option is missing in the UI? You can do this using our filters. Read more here