Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

now this is quite difficult to phrase or to find for me, as I am still new at wordpress and I would like to do something that I suppose is a bit more complicating. Basically I have an area in my theme with 3 possible templates. When you create a page you can choose if that area should have: 1 Box 2 Boxes 3 Boxes

Now in those boxes should be information. Now the question: How do I get dynamic content into those boxes AFTER the client chose which template he would like to use for his post.

It is very important for me that you understand that I am not looking for "Template Name" in the PHP file so that you can choose the template for a specific page.

I want to have dynamic content for pages in a particular template that needs to be customized from page to page.

I hope that somebody has an answer to that.

Thank you very much in advance.

Best wishes Richard

share|improve this question
    
codex.wordpress.org/Custom_Fields –  Wyck Sep 3 '11 at 17:39
add comment

1 Answer

up vote 0 down vote accepted

I think I understand what you're talking about. You would like to allow users to choose the amount of columns to be used for the page/post they are creating. You want to use different template files to achieve the different template layouts.

There are two ways of doing this. One is to use different template files as you mentioned and setting up a short-code to surround the different blocks in the post/page editor.

The other way which I believe is the best route is to use args to tweak the output of the content. SitePoint has a pretty easy to follow article explaining this method. If you're interested here is the article: http://www.sitepoint.com/split-wordpress-content-into-multiple-sections/

The only problem I've encountered using the methods above are explaining to users how they work. The content that will eventually gets displayed in one, two, or three columns all gets added using a single text editor which is a one column editor. At first it seems to give users trouble, but they catch on quickly.

An option that I've not mentioned, but you might want to look into would be using Advanced Custom Fields to separate the content into blocks.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.