Display option value in editor (TinyMCE)
-
I’m planning on using the add_option function to set some basic site-wide information. These are easy to retrieve and output in a theme file, but I’m wondering if there’s a way to add them to a page’s content through the editor in WordPress. I’d like to be able to display, for example, a phone number on several pages, which I’d then have stored as an option (in wp_options). This way, I could keep these basic pieces of information editable in one place, with references to it where needed.
Example of what I’m hoping to achieve:
(in the visual editor)
“To get in touch, please call [option:phone_number] during business hours.”Does WordPress natively support anything like this, and if not, how would I go about achieving this?
- The topic ‘Display option value in editor (TinyMCE)’ is closed to new replies.