TABLEON - WordPress Posts Table Filterable

[tableon]

Main shortcode which draws posts table. Can be used without attributes using default values. With attribute 'id' (table ID) used to display created tables in the plugin backend. All attributes has higher priority than the settings in the backend!

Attributes:

  • id: main attribute, means created on the backend table ID. You can create table and overload some its parameters with attributes below.
  • post_type: what post types posts to display in the table. By default 'post'.
  • columns: set table columns. Example: [tableon columns='id,thumbnail,title,__price,gallery']. All possible columns keys you can get on the plugin admin page-> tab Settings -> button "All possible columns keys" on the settings table bottom. Gallery: read about how to get image ids for each post: https://posts-table.com/hook/tableon_gallery/
  • cells_width: set width of the columns according to their order in the table: [tableon cells_width='1px,200px,20%,auto']
  • per_page: set posts count per page
  • per_page_sel_pp: set values per page, example: [tableon per_page_sel_pp='5,15,25']
  • per_page_position: set pagination position. Example: [tableon per_page_position='t']
    • t - top
    • b - bottom
    • tb - top and bottom
    • none - do not show this drop-down
  • per_page_sel_position: set per-page drop-down position. Example: [tableon per_page_sel_position='t']
    • t - top
    • b - bottom
    • tb - top and bottom
    • none - do not show this drop-down
  • order_by: key by which posts sort ordering after the page loading. All possible keys you can get on the plugin admin page-> tab Settings -> button "Order by keys" on the settings table bottom, see "Order by keys" in the appeared popup.
  • order: posts sort ordering direction, 2 possible values here: asc OR desc
  • hide_text_search: each [tableon] shortcode has search-input above which allows to make searching by posts title, set 1 here to hide it if its necessary
  • text_search_min_symbols: here you can set minimum count of symbols when searching by post title is visible
  • text_search_placeholder: placeholder for search-input by post title
  • filter_form: add filter form above the table. Example: [tableon filter_form='price,pa_color']. All possible keys you can get on the plugin admin page-> tab Settings -> button "All possible columns keys" on the settings table bottom, see "Order by keys" in the appeared popup.
  • hide_filter_form: if to set 1 will appear button instead of filter form, by click on this button filter form will be appeared
  • disable_filter_form: completely disable (hide) filter form if it exists
  • use_load_more:if to set 1 here - instead of pagination on the table bottom will appear button "Load More".
  • table_html_id: Example: 'my_great_table' - for CSS purposes or programming ones
  • post_status: using this attribute is possible to show posts not only with 'publish' status. Example: 'publish,draft'
  • orderby_select_fields: if to set values here sort drop-down appears.  All possible keys you can get on the plugin admin page-> tab Settings -> button "All possible columns keys" on the settings table bottom, see "Order by keys" in the appeared popup.
  • compact_view_width: For small mobile devices. Here you can set window width less of which the table will be displayed in compact mode. Example: 500
  • hide_on_mobile: set columns which you maybe want to hide on mobile devices
  • show_cart: if to set 1 - shopping cart will be shown on the table top
  • cart_position: 0 - Cart right, Sorting drop-down left; 1 - Cart left, Sorting drop-down right
  • show_print_btn: show print button on the table left top
  • display_cell_info: display cell info on its mouse hover
  • skin: skin for the current table, read more about skins here
  • current_page: start page after table loading. Example: 4
    Also using GET data it is possible set page number by link, example: https://demo.posts-table.com/?current_page=7 - make your attention on the link field 'current_page'
  • use_flow_header: flying header when scroll table. Enabled by default.
  • predefinition: only in JSON format, not recommended to use it in this way as is error possible, better use with table tools -> tab "Predefinition", but you can do it, example: [tableon predefinition='{"ids":"13287,12851,12843", "author":2, "by_taxonomy":"category:25,26|post_tag:19|rel:AND","ids_exclude":"13552","not_by_taxonomy":"post_tag:19|my_custom_tax:21|rel:or"}']
  • author: get posts by their author id. Can be used for membership plugins.
  • mode: possible values - 'ajax', 'to_json', 'json'. Ajax mode is always on if not redefined by this attribute. 'to_json' mode allows to cache posts data on the fly and user can navigate through them in the table without server requests, searching by posts title only (filters works with database only)! 'json' not get posts by ajax and display on the page completely cached table exactly after page loading. As 'json' mode uses on the backend, on the front with this mode should be applied shortcode attribute is_front=1If set 'json' or 'to_json' mode 'orderby_select_fields' will be disabled! See the ('json' mode) demo here.
  • is_front: this attribute is used on pair with mode='json'. Тo native functionality. Example: [tableon id=30 mode='json' is_front=1]
  • filter_provider: special attribute which allows to synchronize TABLEON database requests with different plugins as posts filters for WordPress, for example: mdtf. Read developers info here.
  • tableon_text_search_by: special attribute for text-input 'Search by title' which by default search post only by its title. By this attribute you can extend searching it by next fields: post_title (default), post_content, post_excerpt. Also if you using text-input by title from filter constructor this attribute also will help to use text searching by the one text-input.
  • css_classes: any CSS classes  for the table container
  • no_found_text: custom text when no posts found
  • table_view: only one value is possible here - 'separated', separates cells of the post table. See demo pages to understand:
  • post_title_as_text - disabling/enabling link on post title (1/0)
  • disable_link_on_thumb - disabling/enabling link on post thumbnail (1/0)

Some examples of  mixed using:

  • [tableon id=25 columns='id,title,category,my_custom_taxonomy,post_tag' cells_width='1,80%,auto,150']
  • [tableon id=14 columns='id,title' filter_form='title, __price']
  • [tableon id=13280 table_html_id='tt13270aa' post_status='draft' orderby_select_fields='title,title-desc']
  • [tableon columns="id,post_title,cars_model" per_page=4 per_page_sel_pp="2,4,6,8" per_page_position='t' per_page_sel_position='t' order_by='post_title' order='asc']