Posted: July 9, 2015 at 1:09 pm
|
On single event pages, I’d like to move the venue information to a sidebar, like shown on this page: |
You can create a shortcode for displaying event venue in sidebar as follow:
|
|
|
That’s a nice little shortcode WisdmLabs! Can I add one thing to it? As that shortcode will likely be used in a Text Widget, add the following code before the above code:
Not all themes allow shortcodes to be added to Text Widgets. That code will enable it. Also, that code would need to be added to a site specific plugin: https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/ (or your themes functions.php should work, but I highly recommend using a site specific plugin). |
|
Wow, thank you WisdmLabs and Dean! I must confess, this is getting beyond my capabilities. I do have a site specific plugin I’ve been using, but adding this code into it hasn’t changed my page. Is there something else I should be adding to my single-epresso_events template to pick up on this addition? |
Hi Deborah, This actually creates a new shortcode that you can use to display that information in a widget. First, you would add that sample code to your theme’s functions.php file or a site specific plugin. Then you would add the shortcode for [event_tags] to something like a text widget through Appearance –> Widgets. — |
|
|
I came up with a different solution. On the content-espresso_events.php file, I deleted this line: <?php get_template_part( ‘content-espresso_events-venues’); ?>. Then on the single-espresso_events.php file I’ve saved within my child theme, I added that line to the div class for the right side of the page. Worked great. |
The support post ‘Display event venue details as a sidebar’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.