Shortcode / Computed Value or HTML in WP Post / Woocommerce Table

For particular purposes, WordPress enables the use of a few default shortcodes. These shortcodes can be used on your table with the help of Ninja tables.

Let’s dive into this demonstration to learn about the application of this feature.

We’ve used the WP Posts table option for the demonstration.

  • First, you need to make a table using the Ninja Tables plugin. So navigate to the plugin’s dashboard and click the WP Posts option.

  • Therefore, the interface changes accordingly. Then, place the table title in the input area, similar to the Product Demo.

WP Posts Product Demo
WP Posts | Product Demo

  • Then check the appropriate field types to be shown on your table and proceed to the Selected Types section by clicking on the right arrow.
select types for post

  • Then each selected field will be transferred to the Selected Types section.
custom post type

  • Tap the Next button, and you’ll find options to configure selected field properties.

  • Next, switch the required properties to the Selected Properties by checking & clicking the right icon.
select properties for posts

  • A table will be created automatically after you click the Save button.
custom product table

  • Create a new column by clicking on the Add Column at the top of the table to use the Shortcodes / Computed Value in Ninja Tables.

shortcode in tables

  • Now, go to Dynamic Data Settings and click Field Type. There will be a drop-down option. From there, click on the Shortcode / Computed Value or HTML.
Shortcode / Computed Value or HTML

  • By clicking the Shortcode / Computed Value or HTML option, you must use a shortcode to fill in the field input value field.
use a shortcode to fill in the field

  • Follow the instructions given under Field Value until entering the value. Then, place the shortcode needed in the input fields. You can get the pre-built shortcodes from the website, or you can get those pre-defined shortcodes from various sources that are allowed in WordPress.
  • The shortcode is given in the Field Value input field to add to the cart.
field value input field

  • Now, you will see a new column titled Buy Now, with its value generated in the admin section.
new column generated

  • Then, tap on the Preview button to display the interface’s final output.
shortcode to product table

This is how you can use Shortcode / Computed Value or HTML in the WP Posts or WooCommerce option of Ninja Tables.