View Categories

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

2 min read

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 WP Posts table using the Ninja Tables. So navigate to the plugin’s dashboard and click the WP Posts option.

  • 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.

  • 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.
dynamic post data settings
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.
shortcode-computed value

  • 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 docs.woocommerce.com 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.
add a shortcode

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

  • Then, tap on the Preview button to display the interface’s final output.
add to cart button with shortcode

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

2 Comments

    1. Hi John,
      Ninja Tables supports shortcodes and HTML fields. We need more context to know what actually your problem is. I suggest you to open a support ticket from here(https://wpmanageninja.com/support-tickets/) and talk to our support team. We’re here to ensure that you make the most out of your upgrade and have a seamless experience with our product.
      Thank You,
      Mohiuddin Omran

Leave a Reply

Your email address will not be published. Required fields are marked *