1. Home
  2. Knowledge Base
  3. Posts Table Pro
  4. Posts Table Pro Options

Posts table sort options

In Posts Table Pro, you can sort the posts when the table first loads. The table is "pre-sorted" when it is first displayed to the user.

Your users can also sort by clicking on a column heading. For example, clicking on the Title column will sort the posts alphabetically by title (A->Z). Clicking a column heading a second time will sort the column in the other direction (Z->A).

Sort on table load

You can easily choose how to sort your posts using the Sort posts by option in the table builder. It defaults to Date published.

The options are:

  • Title – sort by post title
  • ID – sort by post ID
  • Date published – sort by publish date of the post/page
  • Date modified – sort by last modified date
  • Page order (menu order) – sort by 'Page' order (Order field in the Edit Page Attributes box). Any post type with distinct menu_order values can be sorted with this option
  • Post slug – sort by the post slug (the URL-friendly name)
  • Author – sort by author name
  • Number of comments – sort by how many comments each post has
  • Random – display the posts in a random order each time the table loads
  • Other – sort by any other column in your table. When you select this, a Sort column field appears where you enter the column name, e.g. categories or a custom field
Table generator sort options

As well as the keywords listed above, you can sort by any column that is present in the table.

Sort by custom field

To sort by a custom field, the field must be present as a column in the table.

Date custom fields

To sort by a date custom field, you must also register the custom field as a date column by selecting the 'Date' column type in the advanced column settings.

Sort order

This controls the direction to use for sorting by when the table is first displayed. By default, descending order is used for date-based sorting, and ascending is used for everything else.

You can set the sort order by selecting 'Ascending' or 'Descending' in the table builder.

Can I sort by multiple columns?

Yes. Enable the Multi-column sorting option in the table settings to let visitors sort the table by more than one column at a time (up to two columns). This is useful when two fields matter together, such as price and rating, or date and category.

The table is sorted by the first column, and any posts with the same value are then sorted by the second column.

Can I sort the table by number?

Yes, you can sort custom taxonomy or custom field columns by number. To do this, open the advanced column options for that column, and change the 'Column type' to 'Number'.

Related Articles

If searching the knowledge base hasn't answered your question, please contact support.