jimmy
jimmy

Reputation: 756

WordPress - add Database driven tables

I'm just trying to move one of my old php sites to wordpress. As part of the site I have 'top tables' e.g. top 10 cars, listing their features etc. At the moment that all comes from a database and the HTML is generated from the data. So if a car soon gets a hybrid engine I just check that in the database and my web site table updates to reflect that.

This all works fine. I just don't know where to start when trying to implement something like this in wordpress. I want to keep the WP header, footer, nav... and put my table in to the content area.

Someone recommended simply copying the current generated HTML in to a new post and editing the HTML when anything changes, this sounds like a quick solution but there must be a better way of doing this.

Ideally I would want to keep my current data input pages (and separate database) for all of this 'table data' and present the out put as a post.

If anyone can point me in the right direction (key words I should search for, a guide) that would be great.

Upvotes: 0

Views: 858

Answers (1)

Denis de Bernardy
Denis de Bernardy

Reputation: 78413

Depending on your usecase, you'll usually want to use a static page template:

http://codex.wordpress.org/Page_Templates

Or shortcodes:

http://codex.wordpress.org/Shortcode_API

Upvotes: 1

Related Questions