I am designing a WordPress blog where I will have two types of posts:

a. Normal posts; regular posts with a number of text paragraphs

b. Posts with table content, where the table structure will be more or less like http://click.apache.org/docs/user-guide/html/images/introduction/simple-table.png

Knowing that normal posts will be the regular Posts > Add New from the admin area. I came up with two solutions for the table-type posts:

Solution A

A custom post type. My knowledge of custom post types is very limited but I believe I would need to create the custom post type, a template for it as well as any custom fields I may need

Solution B

Shortcodes, where I treat posts with table content just like regular posts only that where I want to place the table I will use a string such as:

[PEOPLETABLE]231|Albert Master|albert.master@gmail.com|Bonds

210|Alfred Alan|aalan@gmail.com|Stocks

256|Alison Smart|asmart@biztalk.com|Residential Property


The html in the post will then be rendered by passing this string to a shortcode where the parsing will take place and the HTML generated.

Am I right in saying that Solution B is faster as it does not involve custom templates and custom fields?

Read more here: Custom Post Type vs Shortcode: Which one is more performant?


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , , ,

Wordpress related questions and answers: