How client can edit WordPress without breaking HTML?

Usually I set up pages in WordPress by putting all the HTML in and the client will edit the content in the WYSIWYG editor

This is great, until they accidentally delete a div or break something.

Read More

What is the correct way to go about this making it idiot proof, so that they can change titles, paragraphs etc without potentially deleting parts of the structure?

Related posts

Leave a Reply

2 comments

  1. If your client does not know HTML, and you know this going into the project, the only things he/she should be inputting in the page editor are words, uploaded media, and elements that can be inserted using the visual editor. It’s a pain in the butt, but your theme should be the part that’s “idiot proof”.

    Build your theme to wrap the_content(); in a div, and style all the potential elements that can be input accordingly. Only rely on elements that can be added using the CKEditor.

    e.g. (within the loop, in a theme template file)

    <div id="myContentDiv">
    <?php the_content(); ?>
    </div> 
    

    Then your CSS:

    #myContentDiv p {
    
    }
    
    #myContentDiv ul {
    
    }
    

    etc.

  2. There’s a few options that comes to me right now:

    1. Use jquery plugins to get columns (which is pretty bad IMHO)
    2. Use a plugin with shortcodes (so you wrap each column with them), which is good but user may screw it up yet
    3. Use custom fields (like one text area “Right column content”, then you have another text area “Left column content” and so on)

    All these 3 are quite easy to implement! 🙂

    []’s