Posts Table controls
Posts Table ProĀ comes with various elements that can be displayed aboveĀ or below the table. These make it easier for usersĀ to search, sort and filterĀ the table. These elements are:
- Search box ā the keyword search box at the top right of the table.
- Page length ā the āShow <x> entriesā select box above the table.
- Totals ā the total number of postsĀ text displayed below the table (e.g. āShowing 1 to 10 of 50 entriesā).
- PaginationĀ - the paging options that appear below a multi-page table.
- Reset button ā the āResetā link next to the search box whichĀ removes the current search/filters.
- Footer ā an optional row at the bottom of the table where you can repeat the column headings
- Scroll offsetĀ - if you have a sticky header, you can also change where the table reloads so that the top isn't hidden behind the sticky header
DisplayĀ searchĀ box
The Search box option controls whether to display the search box, and where it should appear. It appears at the top by default and the options are:
- Top ā show search box above the table (top-right)
- Bottom ā show below the table (bottom-right)
- Both - show above and below the table
- False ā hide the search box
You can choose these options on the Edit tableĀ page, plugin settings page, or directly in a shortcode.
Shortcode options
Use the search_box
option to set options directly in the [posts_table]
Ā orĀ [posts_table_template id=""]
Ā shortcode. The options are top
, bottom
, both
, or false
.
Example: [posts_table search_box="bottom"]
DisplayĀ pageĀ length
The Page length option controls whether to display the āShow <x> entriesā drop-down menu, and whether to display it above or below your table. It appears at the top by default and the options are:
- Top ā show page length above the table (top-left)
- Bottom ā show it below the table (bottom-left)
- Both - show above and below the table
- False ā hide the page length drop-down
You can choose these options on the plugin settings pageĀ or directly in a shortcode.
Shortcode options
Use the page_length
Ā option to set options directly in the [posts_table]
Ā orĀ [posts_table_template id=""]
Ā shortcode. The options are top
, bottom
, both
, or false
.
Example: [posts_table page_length="false"]
Display totals
The Totals option controls whether to display the total number of posts in the table (e.g. āShowing 1 to 10 of 50 entriesā), and where to display it.Ā It appears at the bottom by default and the options are:
- Top ā show page length above the table (top-left)
- Bottom ā show it below the table (bottom-left)
- Both - show above and below the table
- False ā hide the page length drop-down
You can choose these options on the plugin settings pageĀ or directly in a shortcode.
Shortcode options
Use the totals
Ā option to set options directly in the [posts_table]
Ā orĀ [posts_table_template id=""]
Ā shortcode. The options are top
, bottom
, both
, or false
.
Example:Ā [posts_table totals="top"]
Display pagination
The Pagination option controls whether to display the pagination buttons for scrolling between the results, and where to display them.Ā It appears at the bottom by default and the options are:
- Top ā show page length above the table (top-left)
- Bottom ā show it below the table (bottom-left)
- Both - show above and below the table
- False ā hide the page length drop-down
You can choose these options on the plugin settings pageĀ or directly in a shortcode.
Shortcode options
Use the pagination
Ā option to set options directly in the [posts_table]
Ā orĀ [posts_table_template id=""]
Ā shortcode. The options are top
, bottom
, both
, or false
.
Example:Ā [posts_table pagination="false"]
Paging type
The paging_type
option controls the style of pagination used for your posts table. Choose between 5 pagination styles:
- Numbers ā page numbers only
- Simple ā āPreviousā and āNextā only
- Simple numbers ā āPreviousā and āNextā buttons, plus page numbers (the default)
- Full ā āFirstā, āPreviousā, āNextā and āLastā buttons
- Full numbers ā āFirstā, āPreviousā, āNextā and āLastā buttons, plus page numbers
You can choose these options on the plugin settings pageĀ or directly in a shortcode.
Shortcode options
Use the paging_type
Ā option to set options directly in the [posts_table]
Ā orĀ [posts_table_template id=""]
Ā shortcode. The options are numbers
, simple
, simple_numbers
, full
, or full_numbers
.
Example: [posts_table paging_type="full_numbers"]
ResetĀ button
The Reset button option controls whether to display the āResetā button above the table. It defaults to 'true' - change it to 'false' to hide the button.
You can choose these options on the plugin settings pageĀ or directly in a shortcode.
Shortcode options
Use the reset_button
Ā option to set options directly in the [posts_table]
Ā orĀ [posts_table_template id=""]
Ā shortcode. The options are true
and false
.
Example:[posts_table reset_button="false"]
Show footer
The show_footer
shortcode option lets you show the column headings at the bottom of the table as well as the top. The default is false
(i.e. hide the footer headings), but you can set this to true
to show them.
Example: [posts_table show_footer="true"]
This option is only available when you set it directly in aĀ shortcode.
Scroll offset
When paging between multiple pages of results in your table, Posts Table Pro will automatically ājumpā back to the top each time. This is particularly useful if you are displaying a large number of rows on each page. Posts Table attempts to scroll to the correct position on the page but sometimes it doesnāt quite calculate this correctly. This is because each website and WordPress theme is different and some can have features which interfere with the scroll position ā e.g. sticky navigation menus.
The scroll_offset
shortcode option lets you override the scroll amount or disable this behavior altogether. The default scroll amount is 15
. If you find that the top of your table is āchopped offā when moving between pages, try increasing this to a larger number (e.g. scroll_offset="50"
). If youād like to disable automatic scrolling, set this option to false
.
Example: [posts_tableĀ scroll_offset="35"]
This option is only available when you set it directly in aĀ shortcode.