I am using a theme that comes with several different font stylings for headers and text. However there is no simple way to apply these classes inside the editor. How can I enable a drop down similar to TinyMCE that allows me to select text and apply a class/style to it in order to have my marketing and sales department style their posts.
Tell me more
×
WordPress Answers is a question and answer site for
WordPress developers and administrators. It's 100% free, no registration required.
|
You'll need two code snippets. The first puts the select menu there. The second populates it. This is based on this tutorial, but slimmed down a bit.
The "Display Name" and "class-name" above are up to you, but that's what determines what classes get listed. I also usually use this as an opportunity to kill off the 3rd, 4th, and 5th options in the second row of buttons, but I put them back in for this snippet. |
|||
|
|
|
If you install the plugin TinyMce Advanced you can go to the settings page and drag the styles button into the editor. This gives you the ability to add classes to inline text: |
|||
|
|
