TABLEON - WordPress Posts Table Filterable

How reload meta display in the cell

For example you added to the table meta key ‘_regular_price’. By default it will be displayed as simple number or string. But what about if you want to format it and display with even another information near? Overload its output! In file functions.php of the current WordPress theme add next code:

format_price here is […]

How to add referral button to the posts table

If you want to add button which link to any external information about a post: in file functions.php add next code:

ref_btn is just name of key for TableOn profile, you can use your own one. _product_url in the code is the meta key with the link, of course you can use your own […]

How to display custom boolean meta field

In file functions.php of the current WordPress theme add next code:

Do not forget to replace meta key in the code ‘_my_marks’ to your own one. So instead of displaying 1 or 0 relevant icons will be displayed. Sure by CSS you can display your own icons instead. Also read: https://posts-table.com/how-reload-meta-display-in-the-cell/  

How to insert in top menu tableon_button shortcode?

You can see results on the top menu of the site https://demo.posts-table.com/ -> click on ‘Hottest Posts’ Do next: Create on TABLEON admin page new shortcode [tableon] Open settings of the new shortcode -> tab ‘Predefinition’ -> ‘Posts ids’ -> Using comma, set posts ids you want to show in the table. Example: 23,99,777. Set […]

Is it possible to create custom button with custom functionality?

Yes. It is possible to add your own custom functionality and use it as shortcode. Example: (add next code to file functions.php)

Results: button, on click shows popup with data  

How to make search by post title faster

Using FULLTEXT indexing will in increase the speed of posts searching by its title. Do next: open your site database using phpmyadmin page enter to your site database find table “wp_posts” click on tab “Structure” find field “post_title” find on the right side and click “More” -> “Fulltext” on the popup click OK and wait […]

Show some tables on the same page in tabs

You need to create custom shortcode to combine the tables in one place. In file functions.php add next code:

Titles here means tabs titles.  

How to add search input where table will be is as drop-down list

Search-input can be placed to the site header or into the page content text. Use shortcode [tableon_drop_down]. create new TABLEON table on the plugin backend set all necessary options you want for the table open page where you want to place shortcode drop into the page content shortcode [tableon_drop_down id=7] where 7 is ID of the […]

How to add custom column to the tables

Use hook tableon_profile_extend for it. For this in file functions.php add next code:

Using $post_id you can create any data and return it directly to the cell. Lets review more complicated example demonstrated here. Make your attention on button “Ask Me”, click on it. As you can see this is contact form where customer […]

How to add refferal buttons into the table

Use hook tableon_profile_extend for it. Here is some examples: Lets add referral button to the table:

This is good for external posts you promoted on your site Also you can get referral link in another way, for example take if from the post metadata  

How to enable more fonts for columns?

Go to TABLEON settings Find row ‘Fonts’ Use comma and do not use quotes! Example: Helvetica,Roboto  Use fonts which are represented in the current WordPress theme!  

How to set position of the filter by post title?

TABLEON tables has inbuilt search input for searching by posts title, which not belongs to filter constructor, and its position is always on the top. Visibility of the search input managed by option in the tab “Options”: The search input is synchronized with the “Filter” functionality but its position is not changeable. So, if the […]

Is it possible to customize CSS only of one table cell?

Yes! If content of the cell is constant – it is possible use generated CSS class as on the screen: hashXXXXXX Also each cell has CSS class, dependent of the field of the current table cell Also table cell has data-attributes: data-pid, data-key, data-field

As you can see above using 2 data-attributes allows targeted […]

How to create custom column for meta field

Use tab “Meta” in the table tools popup. Also you can add it by code. Use next code in file functions.php:

Trough code you can use custom columns in such shortcode [tableon id=49 columns=’id,title,__price,hmeta_1′] Also for some tables it is possible to modificate results in the table cell:

This code for table 21 in […]

Sort on meta value but include posts that do not have one

If to use sorting by meta keys – will be visible only posts which has any value for the selected key. This behavior is peculiarity of WordPress engine. Here is an article about how to resolve it: https://wordpress.stackexchange.com/questions/102447/sort-on-meta-value-but-include-posts-that-dont-have-one  

Troubles with TABLEON and Elementor

If you want to place posts table into the page created by Elementor you should add next code into the file functions.php of the current WordPress theme:

13778 in the code – is the page ID, where you want apply TABLEON tables and Elementor constructor.  

How to create remote page with the posts table

Remote page with the posts table can be created on any another site, for example sites of your partners where they spread your posts as referrals. Not depends on CMS and can be placed even on a simple HTML template page. See inbuilt posts table in simple HTML template here. To create: create page on […]

Show different tables to users selected by user roles

You can wrap some shortcodes into your custom one. Do next: open file functions.php of the current WordPress theme paste and edit there next code:

paste shortcode [my_tableon_1] to page you want also make your attention to $args – you can make custom shortcode attributes On this way you can create different custom shortcodes […]

How to add meta key globally to all shortcodes

Use hook tableon_profile_extend. Example: add next code to file functions.php of the current WordPress theme

In code replace your meta key in variable $meta_key and change column title (My meta column). Make your attention on metadata types: text number calendar    

How to modificate cell output of any column by its key

If you need to modificate output of any field predefined in TABLEON you can use next code:

In the example you can see output modification of the meta column ‘__sale’.