3. Managing and editing tables
It's easy to view and manage the tables that you create with Posts Table Pro.
List of tables
To view all the tables that you have already created, go to Post Tables → Tables in the WordPress Dashboard.
The list of tables includes the following information about each one:
- Table name - The descriptive label which you added when you created the table.
- Content type - The post type being displayed in the table.
- Selection - Details of what will be displayed in the table.
- Shortcode - The shortcode which you can use to add the table to your site (you'll need this if you are not using the 'Posts Table' Gutenberg block).
Editing tables
To edit an existing table, hover over its name and click the Edit link which appears. This takes you to a page where you can edit all the details of the table. This page includes some more advanced options which are not available in the initial table builder. (Tip: If you need even more options then there are also some even more advanced options which you can edit directly in the shortcode.)
Duplicating tables
You can easily copy or duplicate a table by hovering over its name and clicking the Duplicate link. The new table will appear at the top of the list with "- Copy" after the title. You can then edit the table and make any changes as needed.
Deleting tables
You can easily delete a table by hovering over its name and clicking the Delete link. This will delete the table, but not the data that was displayed in it (e.g. your posts).
Advanced column options
To view these options, click the pencil icon for any column and then enable the 'Advanced' toggle:
Add a link
The following columns can be formatted as links: ID, title, categories, tags, any custom taxonomy, and image. By default, all possible columns are clickable and you can disable the links for individual columns as needed.
Link behavior:
- The ID and titles column link to the single post page.
- By default, clicking on the 'Image' column will open that image in a lightbox. You can change this to link it to the single post page instead.
- Clicking on the categories, tags or taxonomy columns will filter the table by that value. You can change this behavior to link them to the relevant archive page instead.
Column width
Posts Table Pro automatically sizes the columns for the best fit. You can override this behavior and control the column widths manually by entering one of the following values for each column as needed:
- % - Enter the percentage of the table width that the column should take up. If you enter this for all columns then the total must be 100.
- px - Enter the number of pixels wide that the column should be. If you enter this for all columns then the total must be the same or less than the total available space. Generally, we recommend using the percentage option because it gives more reliable results on different screen sizes.
Responsive visibility
Select from the dropdown to control which devices the column will be visible on.
Responsive priority
Setting a priority level for each column is useful when displaying the table on smaller screen sizes (mobiles, tablets, etc.) or when you have too many columns to fit. When the screen size gets too small, the plugin will collapse certain columns down so they are no longer visible, and a "+" icon will appear at the left of each row. This allows the user to expand the row to show its full contents.
Enter priorities to control the order in which columns are "collapsed" on smaller screens. The lower the number, the higher priority that column has. For example, a column with a priority of "1" would have the highest priority and be collapsed last.
Managing tables created using shortcodes
The instructions above assume that you created your tables using the Posts Table Pro table builder. If you created a table using the [posts_table]
shortcode, then the table is generated directly by the shortcode and is not stored centrally.
To edit tables that were created using this method, then you simply need to edit the shortcode. Edit it as needed using the available shortcode options.