0

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.

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

2 Comments

Great I'll have a look at those, I also have a search function (e.g. all cars with 3 doors and sunroof). Does that help narrow down options to shortcodes or a static template?
Either work, really. Both are a means to embed managed php code into WP. The main difference is that shortcodes can be embedded in any post or page, allowing more layout and formatting options. A page template, in contrast, amounts to a new template file for your theme, with whatever code you need in lieu of your content.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.