WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using the latest version of the My Calendar plugin by Joe Dolson with the latest version of WP. I want to output an events list in a particular place in my code, but I can't seem to find any way to do this. The only thing I've found regarding output is by using shortcodes in the post/page.

I guess theoretically I could add a new sidebar widget and then add the templates that way. Then put the sidebar where I want in the code, but this poses two problems: 1. It's a hassle 2. I don't want my clients to be able to move or change this. I'd like to have it set and stay that way.

I'm having some trouble finding the answers to this question. It seems like it would be possible, because most plugins I've used have an option to add output directly in the template code, but I can't seem to find the answer.

Thanks in advance!

share|improve this question
up vote 1 down vote accepted

You can use the function do_shortcode in your template to output the content generated by the shortcode that My Calendar provides for listing events.

For an example, to show a list of upcoming events use something like:

<?php echo do_shortcode('[my_calendar_upcoming before="3" after="3" type="event" fallback="No events coming up!" category="General" template="{title} {date}" order="asc" skip="0"]'); ?>

Take note of the use of single quotes for the function and double quotes for the shortcode attributes.

share|improve this answer
Thanks! This was actually in the FAQs and I totally missed it. – Jeremy Miller Feb 24 '12 at 17:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.