Adding TinyMCE to WordPress User Profile Pages

The framework built in WordPress for the literary journal Shenandoah is all but done. I will be blogging the cocneptual approach to the framework and how we did it soon, but first I have to entice the genius Martha Burtis to blog how she did some of her awesome WP coding kungfu–and actually paying her what I owe her might help that along 🙂

One of the many cool things about Shenandoah is that it’s using WordPress Multi-Site, so each of the issues will be in one network while at the same time each issue can have an entirely unique design, layout, admin space, specified authors, admins, etc. What’s more, we made it so that each author of a work in any given issue of Shenandoah is actually an author in the WordPress system. Which means every author has a user profile page where they can add their bio and photo. Eventually we can (and will) allow each author to submit their own bio, image, and work all at once online. A workflow that is already built-in, but that we are easing into with the contributors. What’s nice about this is that each author will have a consistent bio, photo, and limited control over cleaning up their own work. What’s more, this setup allows us to list all the work any given author posted in Shenandoah across multiple issues.

All that to say I was searching around today for a way to put the TinyMCE visual editor into the text field for the author bio on the WordPress user profile page. Which is important given italics for various publications and links would have to be hand coded in HTML otherwise I figured there would be a plugin for this that worked out-of-the-box (and there very well may be—and I just missed it) but I couldn’t find one. So I started exploring other folks hacks to do this. I tried Kevin Leary’s hack to the functions.php file here, but that kept bringing Shenandoah down (I am using WP version 3.2.1 running multi-site). After looking a bit more I found this hack to the user-edit.php file that worked a charm. It was based on this informative post about how WordPress deals with TinyMCE, which might be useful to some who want to experiment further with such a hack—or even write a plugin.

I did the first two changes but didn’t do the third because I really didn’t need anything fancy in terms of embedding or HTML.

This entry was posted in WordPress, wpmu and tagged , , , . Bookmark the permalink.

2 Responses to Adding TinyMCE to WordPress User Profile Pages

  1. Kevin Leary says:

    `get_the_author_meta(‘description’)` and `the_author_meta(‘description’)`

    Hi Reverend,

    Thanks for taking the time to share the approach above.

    It’s probably best not to edit the WordPress core files, those will get wiped out when you update to the latest version.

    I’ve written a plugin that replaces the Biographical Info profile field with the WordPress visual editor, TinyMCE, allowing you to editor an author’s biography using rich text using a new function, wp_editor(), that was released with WordPress 3.3.

    http://wordpress.org/extend/plugins/visual-biography-editor/

    Using this plugin will ensure that the editor isn’t wiped out with the next core update, which you should definitely do for security reasons.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.