Easy Tables and support for shortcodes

Tips: Easy Tables Shortcodes

Easy Tables is a table manager for WPBakery Page Builder that allows you to create and manage tables with drag and drop interface. The main difference between tables inserted through TinyMCE inside Text Block is that Easy Tables uses a standalone block.

Currently, only text can be inserted as content of cells, and shortcodes are not processed. So, we have a solution for that lack (until the author implements this functionality to the original plugin).

Easy Tables hack

It’s easy. Simply open the plugins file /wp-content/plugins/easy-tables-vc/lib/templates/vc_table.html.php and change the last line in the file that says

echo $output;

to

echo do_shortcode($output);

And voila, all shortcodes inside Easy Tables cells will be processed.

Comments

6 responses to “Easy Tables and support for shortcodes”

  1. wiseprt Avatar
    wiseprt

    Hello, tried your tweak but no luck. I just change in the file wp-content/plugins/easy-tables-vc/lib/templates/vc_table.html.php the last line from echo $output; to echo do_shortcode($output);

    Is this the only thing that i have to do? Cause as i saw in the video you have a whole devyard.php file there…

    Please help
    Best Regards

    1. Aleksandar Urošević Avatar

      Change in vc_template.html.php enables processing of shortcodes in Easy Tables cells. Now insert any shortcode to cell and that should work.

      devyard.php file in my video describes basics of creating dummy shortcodes for inserting image and link to content in WordPress, including Easy Tables cell, but if you wish you can use any shortcode there.

  2. Sped Avatar
    Sped

    Whilst this does fix the issue it expands the row to the size of the shortcode, so longer shortcode usage like an ultimate icon with tool-tip can quickly make the table rows huge.

  3. Chris Avatar
    Chris

    Thanks for the tip, it worked – one issue I found was with shortcodes containing url with characters that might get converted, such as quote (&quot). The conversions done by easy tables can mess up the shortcode output.

    Adding this line before the echo helped: $output = htmlspecialchars_decode($output);

  4. Tim Avatar
    Tim

    I cant display an advanced custom field. Is there any way to display them? Shortcodes doesnt work for me.

    Thank you.

    1. Aleksandar Urošević Avatar

      Hi Tim,

      I had not used Easy Tables for a long time now (to be precise – 4 years). Is possible that WPBakery has not fixed that 4 years after?
      I recommend to you contact WPBakery support, at least Easy Tables is premium plugin with support.