0

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?

2
  • 1
    Please explain what that means. Adding content should not affect the template.
    – fuxia
    Dec 30, 2012 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.
    – bosco
    Jan 4, 2013 at 0:01

3 Answers 3

1

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.

2

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...

2
  • I'll upvote that.
    – s_ha_dum
    Jan 4, 2013 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, 2013 at 17:56
1

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.

4
  • 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, 2012 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, 2012 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, 2012 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, 2013 at 0:31

Your Answer

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

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