Add WYSIWYG controls to a particular custom field

Notes

As of WordPress 3.2, this implementation can be finicky – mostly an issue with inserting images into the right editor.

However, WordPress 3.3 (as of this note, is in beta 2) in getting an Editor API which will make adding 2nd (and 3rd…) editors to a single page much more reliable. If you don’t see me post an update by the end of the year – 3.3 has a tentative release date of sometime near the end of November 2011 – ping me here or on twitter @trepmal.

Download

I work with a lot of less-than-tech-savvy people. Explaining how to use custom fields on their WordPress site is scary for both of us…

So I’ve been working on this plugin, this is definitely still rough around the edges, so if you spot any major issues, please let me know.

As is, the data will be saved to a custom field called ‘side_info’. Also, it still uses awesome terms like ‘stuff’ and ‘info’ so feel free to edit 🙂

I’m using this with WP3. Haven’t tested for backwards compatibility.

0.2

  • fixed issue with losing linebreaks

7 thoughts on “Add WYSIWYG controls to a particular custom field”

  1. disinpho

    I'm running wp3.3-rc1 and wan't to add the same functionality to my theme, but unfortunately it seems your link gives me a 404.

    Please update the link (and the plugin)

    1. trepmal

      In 3.3, you're much better off using wp_editor().

      <code>wp_editor( $content, $editor_id, $settings );</code>

      You can check out the settings available in core.

  2. Adam W. Warner

    Hi there,

    I found you via the .org forums. I’ve had fun exploring your site so far. I wonder if you could expand on the actual usage of this plugin? I’m just trying to visualize what it provides exactly so I can brainstorm on how it could be applied.

    Thanks Kailey!

    1. trepmal

      Basically, most of the sites I work with have a main content area and a sidebar. The sidebar content would be handled by a custom field. But since custom fields don’t have any WYSIWYG controls, they were near impossible for clients to use.

      This plugin adds a meta box to the edit post/page pages with a textarea and WYSIWYG controls. That data is then saved to a custom field. Makes it possible for the client to edit the sidebar content easily.

Leave a Reply

Your email address will not be published. Required fields are marked *