WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I go about adding a simple button to tinymce on the default editor area of my new Custom Post Type?

I'd like the button, when clicked, to ask for a text value. The script should then lowercase the input and replace spaces with hyphens, and insert [glossary=value-entered] into the editor.

Thanks in advance,

share|improve this question
up vote 7 down vote accepted

Check out this tutorial on Pro Blog Design: http://www.problogdesign.com/wordpress/user-friendly-short-codes-with-tinymce/

share|improve this answer
That is a tutorial and a half... ! Thanks very much, looks like exactly what I need. – dunc Feb 8 '12 at 23:12

Have you read this?


share|improve this answer
I actually hadn't. Is that up to date? Is it simply a case of writing a tinyMCE plugin then using that WP code to load it? – dunc Feb 8 '12 at 22:55
That is up to date. It is as you say, writing a TinyMCE plugin and calling that with the WP code. That is how I've done it in the past. – Sterling Hamilton Feb 9 '12 at 5:16

Your Answer


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.