1. Home
  2. Knowledge Base
  3. Posts Table Pro
  4. Posts Table Pro Features
  5. Show/hide/move the search box, reset link, pagination & other elements above & below the posts table

Show/hide/move the search box, reset link, pagination & other elements above & below the posts table

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.
  • Reset button – the ‘Reset’ link next to the search box which removes the current search/filters.
  • Page length – the “Show <x> posts” dropdown 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.
  • 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

WordPress table elements above and below

Display search box

The display_search_box option controls whether to display the search box for filtering the table by keyword, and where it should appear. Defaults to top. Choose from one of the following options:

  • top – show search box above the table (top-right)
  • bottom – show below the table (bottom-right)
  • false – hide the search box

Example:[posts_table display_search_box="bottom"]

Display reset button

The display_reset_button option controls whether to display the ‘Reset’ button above the table. Defaults to true. Set to false to hide the reset button.

Example:[posts_table display_reset_button="false"]

Display page length

The display_page_length option controls whether to display the “Show <x> entries” drop-down menu, and whether to display it above or below your table. Defaults to top. Choose from one of the following options:

  • top – show page length above the table (top-left)
  • bottom – show it below the table (bottom-left)
  • false – hide the page length drop-down

Example: [posts_table display_page_length="false"]

Display totals

The display_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. Defaults to bottom. Choose from one of the following:

  • top – show above the table (top-left)
  • bottom – show below the table (bottom-left)
  • false – hide the product totals

Example: [posts_table display_totals="top"]

Display pagination

The display_pagination option controls whether to display the pagination buttons for scrolling between the results, and where to display them. Defaults to bottom. Choose from one of the following:

  • top – show above the table (top-right)
  • bottom – show below the table (bottom-right)
  • false – hide the pagination buttons

Example: [posts_table display_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

Example: [posts_table paging_type="full_numbers"]

The show_footer 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"]

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 option lets you override the scroll amount or disable this behaviour 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"]

Was this article helpful?

Related Articles