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.

I'm in a situation where I need to face a situation when there is a WordPress site with landing page and several internal page designs. I know for such situations there is recommended to create more template files for pages with some comments at the beginning like Template Name: Some Style

I've done this already, but the problem is that many of the internal pages contains boxes, areas that are independent from the main template. Let me show you:

enter image description here

So let's suppose we have the main article area and two other boxes. All the three areas have different design. First with some nice background, the bottom left article in a box with background and gradient stuff, the bottom right article is a box also with background and gradient with title and content inside.

I was asked to solve the situation in a manner when the site admin (who don't know any piece of coding) wants to add another similar article with same structure, to be able to do this.

Should I create one single template for this or three? What do you suggest? The idea when new article/page is added, to contain only the usual WordPress generated codes like h2, p, i, etc. So no manually added div's, classes and similar stuff.

Did you faced similar situation? I searched the internet and did not found anything yet. I was thinking something about shortcodes but that will involde tu use codes like [some]content...[/some] or even to have children pages, but nothing is clear for me yet. What do you suggest for me?

Thanks in advance! :)

share|improve this question
add comment

migrated from stackoverflow.com Jun 30 '11 at 14:29

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 1 down vote accepted

Yes you'd need to add shortcodes to the functions.php file in your themes folder in order to use code like [box]Contained content blah blah[/box] in the WYSIWYG editor learn more about shortcodes and how to use them here http://codex.wordpress.org/Shortcode_API

share|improve this answer
    
The question is if there is any other way which not include codes? –  The Hun Jun 29 '11 at 20:00
    
Not unless you add the HTML into the WYSIWYG. –  Frank Martin Jun 29 '11 at 21:02
    
HTML it is NOT accepted in this situation. –  The Hun Jun 29 '11 at 21:10
    
You could use a plugin called page.ly MultiEdit... –  Frank Martin Jun 30 '11 at 7:19
    
this suggestion deserves an acceptance :) thank you very much! this is far the best solution i've ever seen. there is also the "Secondary HTML Content" plugin... but your suggestion is better :) –  The Hun Jun 30 '11 at 12:55
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.