This block requires a separate plugin to be activated. If you’re interested in using this block on your site, please contact us to activate it for you.
When to use
You should use this block when you want to allow visitors to easily search, sort, and/or filter your content, all on the same page. It pairs well with the CALS Custom Post Types plugin, which allows you to register post types beyond the basic post and page.
How to use
The block will appear as a separate block for each supported post type on your site, with the name [Post Type] Directory. For example, to display posts, you’ll add the Posts Directory block to your page.
Block settings
This block offers many configuration options. To keep the interface clean, many settings are tucked away in each category’s Tools Panel menu. To find them, look for the + (plus icon) or the three vertical dots next to a group name. Once a setting is modified, it will stay pinned to your sidebar for easy access.
Filter Position
Determines where the filters are displayed. If you wish to hide all filters and just use the block to display your content, you can disable them here as well.
Sorting
- User sorting
Enable to allow site visitors to sort their own view of the items. - User sorting label
Allows you to override the default “Sort” label above the sort dropdown. - Default sort
The default sort order that will be used when the page is loaded. If user sorting is enabled, site visitors can override this value.
Taxonomies
Each post type has a unique set of taxonomies, if any at all. For example, posts have categories and tags, but pages don’t have any taxonomies. Each taxonomy will have the following options:
Settings
- Allow user filtering
Whether or not this taxonomy is enabled for site visitors to filter by. - User filtering label
Overrides the default taxonomy label. This should be plural, especially if using the dropdown control, because it is also used to generate the “All [categories]…” label. - Filter control type
When displaying filters in a sidebar (e.g. filter position left), choose between displaying this taxonomy’s controls as a dropdown or checkbox. - Make parent terms labels only
Prevents posts from being filtered by top-level terms. These terms will act as unselectable labels for their respective children. - Allowed [categories]
Allows you to pre-filter the view by taxonomy term. Only posts matching the selected terms will be displayed on the page.
Styles (in the styles tab)
Styles can be dependent on the post type and taxonomy. By default, the following options are available:
- Show [categories] in card
Whether to make this taxonomy’s terms assigned to the post visible to the user in the post card. Once enabled, you’ll see the remaining style options in the dropdown. - Link terms
Whether the terms should be clickable and link to the term’s archive page. - Position
Position the terms on the top or bottom of the post card. - Style
Choose from a set of pre-defined styles for displaying the terms. - Prefix
Add a prefix to label the terms. - Limit
Only display the first [x] terms in the card. Can be used to avoid messing up the layout if a post has a disproportionately large number of terms assigned to it.
Limit [Posts]
The following options allow you to select specific posts to include or exclude from the list. They cannot be used together.
- Allowed [posts]
Select exactly which [posts] to include in the list. If a post is selected here but was already filtered out, it will not be displayed. - Excluded [posts]
Allows you to hide [posts] you don’t want to include in the list.
[Post] (styles tab)
The label of this section is dependent on the name of the post type (e.g. “Page”, “Post”, “Event”, etc.). This is where you can configure how the cards are displayed in the list. Settings are not consistent across post types, so they won’t be documented here.
Advanced
- Enable caching
Allow results to be stored on a user’s computer for a short duration to significantly improve speed and performance. This should almost always be enabled on a published page. If you add a [post] to your site and don’t see it in the list, perform a hard-reload (cmd/ctrl + shift + R in Chrome) on the page and they should appear. - Filter parameters and URL sharing
When enabled, search and filter selections will be reflected in the page URL. This allows visitors to bookmark their results, refresh the page without losing their place, or share a direct link to their specific filtered view. - Instant filtering
Makes the user experience feel much faster because it doesn’t have to “ask” the server for new results every time a filter is clicked. Before enabling this option, make sure you are aware of the trade-offs (see plugin for details). - Items per page
If you have a large number of [posts], results will be paginated to improve performance. Visitors can navigate between pages of results using the “next page” and “previous page” buttons and results will indicate how many pages there are (e.g. “Showing 1-24 of 48 posts”). Changing this to a larger number may remove pagination, but it will result in posts taking longer to load.
Interested in using this plugin on your site?
Please contact us and we’ll help you get it activated and set up.