How To Extract Table Data From Posts Using WordPress

What if we tell you there’s an easy way to spice up your WordPress website? You can add data to WordPress tables from posts and customize all you want! After our illustration of How To Embed Online Data Tables in WordPress Posts/Pages, it’s time to show you the other way around.


Pulling all of the data from a WordPress post and displaying them in a tabular format might sound like a hassle to some of you. However, we have a perfect solution. Bear with us for a while.

  • Why consider tables to show WordPress posts
  • Best ways to add WordPress post data on a table

Why consider tables to show WordPress posts

Pepper Potts15, Yemen Road YemenHello, click here to call me.$568/8/2020Content writer, Digital Marketer,,, Capture
RachelScranton, PennsylvaniaHello, send an email to contact me658908/24/2020Digital Marketer,,, Capture
Penny ReedNew York, Central ParkHello, call now to reach.6758/17/2020Developer, Digital Marketer,,, Capture

If you post a lot of content, you will encounter two types of audience- a dedicated reader who follows everything you post and a picky reader who only clicks on a post they find attractive.

Clearly, a table with details is more convenient than a long, wordy paragraph. A tabular appearance is always easy to follow and organized. As a result, your WordPress posts can only reach everyone if you list them on a data table!

Employee namePositionSalary/yr
Jane MurphyManager$50k
John MurphyAccountant$45k
Murphy JaneReceptionist$30k

A table with multiple columns and rows can show short key info that encourages clicks. It’s a shortcut for readers to look for the information they want.

Best ways to add data to WordPress tables from posts

We have chosen the all-rounder WordPress table plugin, Ninja Tables, for this demonstration- a Pro addon with a multitude of smart features. You can fold up your WordPress posts into a table without any additional plugin.

Among the 8 productive ways of creating tables, Ninja Tables stands out because of its integration with WP Posts or Custom Post Types. This built-in feature lets the user add data to WordPress tables from posts in dynamic styles.

  • Custom Column on WP Posts Table
  • ACF Field Integration
  • Shortcode, computed value or HTML
  • Post Meta Field
  • Featured Image

Custom Column on WP Posts Table

First of all, go to the Ninja Tables dashboard and click “Add Table”.

A popup box will appear with all the different ways you can create a table. Click on WP Posts. The box will show several fields, but for this, we chose a single field type “Post” and switched it to the box on the right using the arrow.

After clicking on “Next”, another window will show up with different properties of the post. These properties are the column of the table you are about to create.

Select properties and move them to the right and “Save” again. You can also set conditions with the “+” button.

Now you’d be surprised how quickly you can create a table from your post data! Right after you save step 2, you will be taken to the classic Ninja Tables interface, where you can customize, configure, and design the entire table.

You can modify or customize post properties from “Query Settings” and “Add New Column”.

Here’s another amazing feature. If there’s a permalink category or a post tag, you can sort it from the “Table Configuration” panel.

You can also skim through the documentation if you want.

ACF Field Integration

Among many versatile features, this one magnifies Ninja Tables’ capacity to create tables. Advanced Custom Field ensures this plugin is more dynamic, and it’s only available when users create WP Post.

Click on “Add New” and proceed to name it, “+Add Field”, and Field Label. Now, “Publish” the post.

The added field is published. You can add more fields, edit or move the existing. Check the Custom Fields dashboard and see “ACF Demo” has appeared.

Go to “All Posts” and select the post you want to show custom fields using ACF.

Now, go to the post-table created with Ninja Tables and open “Add New Column”.

You will see the menu expanding to “Dynamic Post Data Settings”. Fill in the “Field Type” from the dropdown and the “Field Value” box.

The field value should be just as you input before. Once you click “Add Column”, the new ACF Demo column will be created for its corresponding post.

Check out the documentation for more.

Shortcode, computed value or HTML

We can start with the “Add New Column” panel from the previously created table. Name the column and choose “Shortcode / Computed Value or HTML” on Field Type.

For dynamic shortcode,

[yourshortcode YourParam=”{post.ID}”]

Add the shortcode and click on “Add Column”. For example, the shortcode made for a WooCommerce table in Ninja Tables on a “Buy Now” column is

Each row will take the respective WP post ID and create the add-to-cart button according to a valid shortcode. Go through the documentation for more clarity.

Post Meta Field

It’s also known as “Custom Fields”, and you can show an additional content of your WP post through Ninja Tables. You can either show a new post or edit an existing one.

For this demo, we are updating a previously made post with Custom Field and displaying it on Ninja Tables Post Meta Field. This feature is done from the admin panel.

First of all, navigate to the post’s “Screen Option” on the top. You will see some checkboxes appear, and one of them will be “Custom Fields”.

Now, if you check the box, the Post Meta will expand to another panel with field name and value.

Here’s Advanced Custom Field as value.

We want to add one of the fields in a table. So, we selected a pre-made table and went to the “Add New Column” panel.

Simply put the value in the field value here on Dynamic Post Data Settings as well and click on “Add Column”.

The outcome will appear on the table automatically.

Featured Image

It’s the easiest part where all you have to do is add a featured image on a post and edit the “Add New Column” panel.

Firstly, open a post to upload a featured image, as shown in the image below.

You can replace or remove the image from the post’s sidebar. Since we already have a table ready, we picked and added images to some posts on that table. The posts with images will show up on the table after you create a new column.

For the Field Value, you can determine the size or form of the image. For example, thumbnail, medium, large, etc. The checkbox for “Link to post permalink” will take you to the post if you click on the image and will “Open link to new tab” if you check the other one.

Right after you “Add Column”, the “Featured Image” column will be created and show corresponding images of posts.


That’s all for WP Post and Ninja Tables now. We have shown how to add data to WordPress tables from posts. You can try it with Ninja Tables as per our demonstration because it’s more flexible and feature-rich. Although, to each their own!

Integration with WP Post is an awesome feature of the table plugin and helps a lot by pulling data from posts. Take a look at the documentation on WP Posts integration.

On a final note, we can also offer you an explanation of adding form entries in WordPress tables.

Leave a Comment