I’m about to turn over a web site to a client. However, for the first time, I have coded a site that does require
surrounding some of the entries that she will make.
What’s the best way to do this? I’m thinking shortcodes, but is there a better way, by which perhaps one can put classes on the format bar? I messed around with TinyMCE Advanced but it didn’t go well.
My first thought would be to have a custom field. Based on whatever is picked and entered by the client, the post in question could have a specific class (perhaps of a wrapping div).
There’s probably better methods but this is just one option that comes to mind.
Oh, if you know there will only be a small amount of classes that can be used, you can of course pre-code that in the template, and have the client just pick the template upon posting.
That’s an interesting idea. It doesn’t work with the site I’m doing currently because she needs to add content to existing pages. But it actually suggests a better way of structuring a site like this.
I did figure out how to add a drop down list of styles on the formatting bar. And that might be the best way to go in this case. But I will consider that for the future.
You should be able to provide the client with a dropdown of classnames in TinyMCE, that way your client can just select the code (or click on an element in the breadcrumb trail) and then select a class for it.
Here’s an article I found after a quick search, not sure if it’s the best but should be a good starting point. http://alisothegeek.com/2011/05/tinymce-styles-dropdown-wordpress-visual-editor/
Thanks very much for the article. (I’m sorry I didn’t see your post earlier for some reason!)
You must be logged in to reply to this topic.
*May or may not contain any actual "CSS" or "Tricks".