How to Add a Shortcode in WordPress
With Events Calendar Pro, you can add calendar content to any WordPress page or post. There are a few different methods that you can use to add a shortcode to your WordPress site, and we’ll show you how to do it below.
Add a shortcode with the Block Editor
To add a shortcode using the Block Editor, you’ll want to head over to any new page or post by selecting Pages (or Posts) > Add New.
From there, choose the + sign to add a block, then search for the “shortcode” block.
Then, enter the shortcode you’d like to use in the field provided and click Publish.
Add a shortcode with the Classic Editor
If you are using the Classic Editor, add the shortcode to the area of the post or page where you’d like to see it using the Text tab. Don’t forget to Publish or Update the post when you’re done!
Add shortcode to WordPress sidebar widgets
To add a shortcode to a WordPress sidebar widget, head over to Appearance > Widgets. Then, search for a shortcode widget block and add it to the sidebar with your desired shortcode.
Add shortcode to WordPress theme files
Lastly, you can add a shortcode right in your WordPress theme files. To do this, add the following shortcode to any WordPress template file.
<?php echo do_shortcode("[your_shortcode]"); ?>
Do more with shortcodes!
Now that you know how to add a shortcode to your site, check out our Shortcode Resources to use shortcodes with The Events Calendar plugins.