Support » Plugin: Events Manager - Calendar, Bookings, Tickets, and more! » Get Sidebar Using Formats
Get Sidebar Using Formats
-
Howdy!
Thank you for the great plugin!
I’m using the formats system to style my events category pages as I don’t know much PHP at all.
I’ve got the following code in the “Single category page format” box:
<section class="container section"> <div class="col-sm-8 col-md-9"> #_CATEGORYNEXTEVENTS </div> <div class="col-sm-4 col-md-3 sidebar"> <!--Sidebar Here--> </div> </section>
Is there a way for me to call the sidebar in the second DIV?
Please help, this is literally the only thing I need to resolve before I can go live.
Help would be much appreciated!
-
yes, but you need custom php coding to make this work eg. https://wordpress.org/support/topic/taxonomy-events-categories-cannot-output-em_category?replies=4
Thank you very much for your swift response Angelo.
The post you pointed me to, was exactly what I was looking for!
Suppose stepping out of my comfort zone and diving into the template structure is the best way to achieve true integration.
To get it working I first had to turn off formatting for events categories.
The code above is from my theme category.php template. I copied that template to my child theme and renamed it to taxonomy-event-categories.php, as the plugin author suggests here:
https://wordpress.org/support/topic/plugin-events-manager-single-category-template
I then replaced the above code snippet with this:
<div class="col-sm-8 col-md-9"> <?php global $post, $EM_Category, $wp_query; $EM_Cat = em_get_category($wp_query->queried_object->term_id); ?> <?php echo $EM_Cat->output('#_CATEGORYNEXTEVENTS'); ?> </div> <div class="col-sm-4 col-md-3 sidebar"> <?php get_template_part('templates/sidebar') ?> </div>
Once again, thank you so much for your help Angelo.
- The topic ‘Get Sidebar Using Formats’ is closed to new replies.