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.

A corporate website has a few static pages, each with a specific layout, several independent blocks of text (located in different columns or zones of the page) and images. So far I handled this by designing a unique page template for each unique such page. But what if a client wants the ability to content manage these (a request which from his point of view sounds natural enough)? Is there an easy way to achieve that?

share|improve this question
1  
Please explain what that means. Adding content should not affect the template. –  toscho Dec 30 '12 at 19:56
    
I don't understand the situation. Why can't the client just log into the Wordpress back-end and edit a page as they see fit? If you followed s_ha_dum's suggestion and put your individual page formats into custom page templates, the client could edit content to their heart's desire without affecting the actual structure of the page. –  boscho Jan 4 '13 at 0:01
add comment

3 Answers

up vote 1 down vote accepted

In this situation, I'll typically add meta boxes with new instances of the editor, but it's not for the faint of heart, that is to say, those not well-versed in php and javascript.

If you want a simple solution for multiple editors on a page and don't mind relying on a plugin, you can achieve this very easily with Advanced Custom Fields.

share|improve this answer
add comment

I honestly lean towards s_ha_dum's answer for efficiency and proper WP use, but if you want to get hacky you could use separate pages (or entries of a custom post-type) to house each individual editable region, then hard-code a custom query into each of your hard-coded template files to retrieve an array of the post-objects relevant to that page. That way you could place the content of specific posts in specific regions of your hard-coded templates, additionally granting you the ability to directly link to the Wordpress editor for any specific region by simply using Wordpress' edit_post_link() function...

share|improve this answer
    
I'll upvote that. –  s_ha_dum Jan 4 '13 at 0:28
    
Bosco's solution, with sub-pages whose content is accessed by custom queries from the main page template to fill the different editable zones of the page with an admin link for each zone, is great and clean. However I think Milo's ACF plugin is a faster solution to my problem, and I'm not scared to use it because this plugin seems extremely robust and unlikely to stop being maintained. –  drake035 Mar 24 '13 at 17:56
add comment

I am assuming that your "unique page templates" are pretty much completely hard-coded. If that is the case, you need to add a Loop where the user content will be.

You'll need to:

  1. Make proper WordPress theme template files, if yours do not already qualify.
  2. Include a Loop in those files
  3. Created WordPress "Pages" from the backend via wp-admin->Pages->Add New
  4. Assign your templates to these pages

Now you can edit the content from the WordPress backend.

share|improve this answer
    
Nope, the content of each page is displayed in separate pieces scattered across the page. This requires some data container for each of these pieces, as opposed to one page loop displaying one block of text. –  drake035 Dec 30 '12 at 23:46
1  
Then your description of the problem is inadequate. If you want a good solution explain what kind of content needs to be edited and how extensive the editing needs to be, and how complex the content editor needs to be. –  s_ha_dum Dec 31 '12 at 4:45
    
Well, several separate blocks of text need to be editable independently (with editors as complex as the main WP editor is poffible). These blocks may belong to different parts of the layout. My question is: how to do that? –  drake035 Dec 31 '12 at 22:50
1  
As @KuroTsuto said, if you need multiple editable sections you are going to have to get hack-ie with child posts or a bunch of custom meta fields, or get very complicated and add multiple editors. Or find a way to break the content in a single editor-- maybe wrap sections in shortcodes or something. What you are asking can be done. I am sure of it, but my feeling is that it is either going to be hack-ie or hard. –  s_ha_dum Jan 4 '13 at 0:31
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.