customizr the event calendar
-
Hi there,
I’m using the event calendar (modern tribe) with a custom post type like described here.
On the events pages I would like to show the right sidebar, while the other blog posts only show the left one.
I was able to deactivate the left sidebar with commenting the hook :
<?php // do_action( '__before_article_container'); ##hook of left sidebar?>
But I do not manage to get the rightsidebar here.
Any additional hook to enforce it ?
Thanks.
-
Probably ’cause your global layout is forced to show just the left sidebar?
Anyway I’d do this:
At the top of that custom template (e.g. just beforedo_action('__before_main_wrapper')
) I’d put this simple filter:add_filter('__screen_layout', 'my_layout', 10, 2); function my_layout($id, $arg){ $global_layout = TC_init::$instance -> global_layout; if ( $arg == 'class'){ return $global_layout['r']['content']; } return 'r'; }
Many thanks,
It’s an awesome hack which is active for any page / post where sidebar is set to left by default. Should be added in snippets.
Unfortunately not working with these “pseudo-page” generated by The Events Calendar.Sorry but you said you were using the custom template I provided in another post, and of course you were using it otherwise you didn’t have the left sidebar, nor had to comment it, so I tried the solution above and it worked fine.
You’re talking about “pseudo-page”.. don’t know what you mean..
Said so, in your page I can see you have the content with the span9, and the space for something like a right sidebar to the right, but there is no sidebar.
This suggests me that, the solution above worked but you have an empty right sidebar.
Am I wrong?nor had to comment it
That’s it ! I was still with commented hook …
I removed the comment and it works like a charm.
Again, many thanks.You’re talking about “pseudo-page”.. don’t know what you mean..
/calendar/ and /event/ are the slugs defined in the settings, but not real pages that one could modify.
- The topic ‘customizr the event calendar’ is closed to new replies.