Support » Plugin: My Calendar » Embedded widget/javascript

  • Trying to embed a javascript widget in each event, and it is not displaying.

    Works fine on other posts and pages, just not in the MC events. Is there a setting that I can change to enable this to show?

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter EmeraldCityEDM

    (@emeraldcityedm)

    This is one of the exact events where i have saved the code to. i have tried adding it to the mc event and also the event post and neither are displaying.

    https://www.emeraldcityedm.com/mc-events/johnny-monsoon-wooly-kryspin-harmony-soleil-c89-5/

    Plugin Author Joe Dolson

    (@joedolson)

    My Calendar doesn’t permit embedded scripts directly in the post content. You could add them via a shortcode if you turn on the option to enable WordPress shortcodes in the output settings.

    Thread Starter EmeraldCityEDM

    (@emeraldcityedm)

    Which setting in output? “Process WordPress shortcodes in descriptions” ?

    Plugin Author Joe Dolson

    (@joedolson)

    Yes, that’s correct.

    Thread Starter EmeraldCityEDM

    (@emeraldcityedm)

    Hmm still not working. Do I also need to check the box for anything else? I have full description checked.

    Plugin Author Joe Dolson

    (@joedolson)

    Is the shortcode showing in the output content?

    Thread Starter EmeraldCityEDM

    (@emeraldcityedm)

    Does “output content” mean the add new/edit event section? I dont understand the question.

    Thread Starter EmeraldCityEDM

    (@emeraldcityedm)

    Also, is there an index of all of the available shortcodes specifically for the main view? I have been looking for this and not been able to find it. I found the support document that discusses shortcodes, but all of the examples seem to only return list format. I am looking to modify the main view.

    Plugin Author Joe Dolson

    (@joedolson)

    The My Calendar shortcodes are documented here: http://docs.joedolson.com/my-calendar/2018/03/04/quick-start-guide/

    By “output content” I mean that calendar front-end on your site, wherever you put the shortcode you want to use to produce your JS widget.

    Thread Starter EmeraldCityEDM

    (@emeraldcityedm)

    I was planning on pasting the script html into the event details. What would the shortcode be for doing this? I cannot find what shortcodes are for the main view, all of the shortcodes I see in the start guide are only for a list view.

    This is the script:

    <div id=”eventbrite­widget­iframe­div” style=””></div>
    <script src=” https://www.eventbrite.com/static/widgets/eb_widgets.js “></script> <script type=”text/javascript”>
    window.EBWidgets.createWidget({
    widgetType: ‘checkout’, eventId: IDHERE, affiliateCode: ‘ [ebdidpemerald] ‘, iframeContainerId: ‘eventbrite­widget­iframe­div’ }); </script>

    Plugin Author Joe Dolson

    (@joedolson)

    You’d need to create a custom shortcode to insert it; making that code allowed directly in the post content is more difficult. Your needs are very simple, so you need something like this:

    add_shortcode( 'eventbritewidget', 'my_eventbritewidget' );
    function my_eventbritewidget( $atts, $content ) {
       return 'your widget code';
    }
Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Embedded widget/javascript’ is closed to new replies.