If you don’t know what is a shortcode and how to use it, you first may want to read this article.
This menu allows your visitors to change the sort order of posts that are displayed in the Toggle Post Filter. It must be used together with the menu and the body (posts) part of the Toggle Post Filter.
Note: If you use masonry or boxed post layout, all displayed posts will be rearranged after sorting to fit best into the available space. The resulting sort order might therefore be different from what you set in the menu.
[tag_groups_tpf_order_menu orderby_text="Sort order" order_text="Up or down"]
- string: A text. For identifiers that won’t be visible to visitors you often have to replace spaces with _ or -. If the string contains spaces, you need to wrap it in quotes.
- integer: A number without decimal places.
- 0 or 1: 0 turns the feature off and 1 on.
This overview assumes that you know how to use shortcodes. Shortcodes are the traditional WordPress way how to add features into posts, pages and widgets.
Text for the menu to select the “order by” of posts.
Text for the menu to select the post order (ascending or descending).
Here you configure the options that appear in the “order by” menu. Options are separated by |. Each options consists of a value and a label that will be displayed in the menu, separated by :. Values must be one of the internal orderby identifiers provided by WordPress or a custom field (see below).
If your posts have custom fields (post meta), you can use them as orderby value. This only works if these custom fields hold strings.
Note: If a custom field is used for sorting, only posts that have that custom field will appear in the list. If the total amount of posts differs depending on the selected sort order, you may have to add the custom field to the missing posts.
We use a custom field “subtitle” that will appear in the menu as “Subtitle”:
If the custom field saves numbers, you need to add “%num” to the field name. Otherwise the order would follow the rule for strings. (“1, 11, 2, 3” instead of “1, 2, 3, 11”.)
We use a custom field “view_count” that holds numeric values.
Here you configure the options that appear in the “order” menu. Options are separated by |. Each options consists of a value and a label that will be displayed in the menu, separated by :. Values must be “asc” and “desc”.
Select a theme. Currently we have “dark” and “light”.
Whether to show a flat menu.1
Optional CSS identifier for the enclosing div.
- If this doesn’t work, check if you use a plugin that processes JS scripts such as “Autoptimize” and add “sumoselect” to the excluded files.