• Resolved danielwiener

    (@danielwiener)


    I have been using do_shortcode() in a template file for quite a while and it worked before the upgrade to 3.0 and now it seems not to be working. I have changed the shortcode to [calendar id=”###”] and it still does not work.

    This is the code:
    <?php echo do_shortcode('[calendar id="20645"]'); ?>
    on this page: http://academicaffairs.risd.edu/

    As a test I put the shortcode in the body of a page and it then worked.

    If you could suggest a fix that would be helpful. I know I can use a widget but in the context using a shortcode in the file is much easier.

    Thanks.
    Daniel

    https://wordpress.org/plugins/google-calendar-events/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Nick Young

    (@nickyoung87)

    Hi what exactly is the issue you are getting?

    You might just need to enable the “Always Enqueue” option in the plugin’s advanced settings page if it is just a visual bug happening.

    Thread Starter danielwiener

    (@danielwiener)

    The issue is when I use “do_shortcode()” in a template file nothing happens. No calendar, no nothing. I checked the html source and nothing is echoed at all.

    I tried “Always Enqueue” and had the same result. And I also checked the source in both instances and all the SimpleCalendar files were loaded.

    There were no php errors, just nothing happened.

    To be clear, I checked the calendar id, which is correct.

    Thanks
    Daniel

    Plugin Contributor Nick Young

    (@nickyoung87)

    Does this happen in 3.0.6 for you? We made a slight adjustment to the shortcode that could have been causing this for you.

    Thread Starter danielwiener

    (@danielwiener)

    The shortcode worked until the recent update. Not sure if I was using 3.06 or the version before that.

    Plugin Contributor Nick Young

    (@nickyoung87)

    What version are you running now?

    Is it just in the template or are you running it some other way?

    Maybe try clearing the calendar cache?

    Would love to get this figured out for you.

    Plugin Contributor Nick Young

    (@nickyoung87)

    Assuming this has been resolved since there has not been a reply here. Let us know if you have any other questions.

    Thanks!

    Thread Starter danielwiener

    (@danielwiener)

    No. I never resolved this. Because of the time demands of the client I changed the part of the page into a widget and then used the simple calendar widget for it to display. I never got the shortcode in the template to work.

    Anyway. the shortcode was just in the template and nowhere else, exactly as written in the first post of this question.

    thanks for your time
    Daniel

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘do_shortcode() not working’ is closed to new replies.