Home › Forums › Calendar Products › Events Calendar PRO › Adding shortcode button to WYSIWYG bar in single event
- This topic has 5 replies, 3 voices, and was last updated 7 years, 1 month ago by verrado.
-
AuthorPosts
-
February 24, 2017 at 4:27 pm #1245596verradoParticipant
Hello! –
We are using a member management plugin that allows us to tailor what content is visible when viewing an Events Calendar event based on user role – it works great in conjunction with the calendar, however, I was wondering if there is a way for us to add the shortcode button to the WYSIWYG editor within a single event so that it makes it easier on our team WITHOUT modifying the plugin (we do not want to jeopardize the stability of the plugin)? I may be able to figure it out if there is a particular custom post type.
Thank you in advance!
Matt
February 27, 2017 at 2:35 pm #1246497CliffMemberHi, Todd / Matt.
Are you wanting a button to insert a single preset shortcode, or are you wanting more of a shortcode builder (GUI for selecting options like which view to display)?
Either way, you could request this as a new feature (or maybe search to see if the idea was already posted by someone else) at our plugins’ UserVoice page.
This allows others who are interested in that feature to easily voice their support. We frequently review suggestions there to find out which ones are popular, then we implement as many of them as we can.
If you post it / find it, feel free to link to it from here in case anyone comes across this forum thread in the future.
February 27, 2017 at 2:37 pm #1246499CliffMemberNow that I’m re-reading your request, I’m unclear if you’re wanting to display the tribe_events shortcode or if you’re wanting your member management plugin’s shortcode to be displayed on the Event Single pages…
February 27, 2017 at 3:31 pm #1246543verradoParticipantSorry for the confusion – I think I figured it out. I developed a plugin that allows the admin to restrict certain content based on a specific user role. The plugin has a button that is visible in the visual editor that could be seen in posts and pages, however, it was not showing up in the event posts, so I had to figure out what the custom post type was to tell the plugin to insert the shortcode button on event posts wysiwyg editor.
The problem was I didn’t know the way to call tribe events and its post type, but I figured it out the post type – “tribe_events” and the user permission “edit_tribe_events”.
Sorry for the confusion!
Matt
February 27, 2017 at 4:30 pm #1246574CliffMemberOkay, great.
FYI: the post type is able to be retrieved via
Tribe__Events__Main::POSTTYPE
the source code for which is at /wp-content/plugins/the-events-calendar/src/Tribe/Main.php
Have a great week!
-
AuthorPosts
- The topic ‘Adding shortcode button to WYSIWYG bar in single event’ is closed to new replies.