Home › Forums › Calendar Products › Events Calendar PRO › Main Events Page with Sidebar
- This topic has 21 replies, 3 voices, and was last updated 10 years, 9 months ago by
Support Droid.
-
AuthorPosts
-
September 9, 2013 at 3:25 pm #65187
Derek
ParticipantHello,
I’m building this website for a client and they want the main events page to show a list of events with a sidebar that has the calendar widget.
When I try using the default page template, the sidebar shows, but the events listings don’t show correctly.
When I try using the default events template, the listings show up great, but the sidebar disappears.
September 10, 2013 at 8:06 am #65284Barry
MemberHi Derek:
One approach would be to customize the default events template and add a sidebar:
* Themer’s Guide
* Codex documentation for dynamic_sidebar()The other would be to work on the appearance of the calendar when you’re using the default page template (which might be a matter of tweaking CSS some).
Do you lean towards either of the above approaches?
September 10, 2013 at 9:05 am #65301Derek
ParticipantThanks Barry,
I would prefer to customize the default events template by adding a sidebar. That seems easy enough – but what code would I use in the template php file?September 10, 2013 at 9:21 am #65306Barry
MemberHi Derek,
Here’s an example of a customized default-template.php that would add a sidebar in the context of the default Twenty Twelve theme. That should give you a starting point, of course there are likely to be differences with your own theme (unless it is indeed Twenty Twelve or closely based on it).
Thanks!
September 10, 2013 at 9:24 am #65309Derek
ParticipantHi Barry, Can you give me that link again? It said the post has been removed.
September 10, 2013 at 9:24 am #65310Derek
ParticipantNever mind, I see it now.
September 10, 2013 at 9:26 am #65312Barry
MemberYep – I made an error first time and had to correct it, sorry for the inconvenience!
September 10, 2013 at 9:59 am #65318Derek
ParticipantHi Barry, I’m having trouble figuring out what file to update? content.php?
September 10, 2013 at 10:34 am #65321Derek
ParticipantI copied all the files to /themes/goinggreen/tribe-events/
Then I edited /themes/goinggreen/tribe-events/views/default-template.php using the code you gave me.
That didn’t work, so I tried…
Settings -> Template -> Events Template.
*
* Override this template in your own theme by creating a file at [your-theme]/tribe-events/default-template.php
*
* @package TribeEventsCalendar
* @since 3.0
* @author Modern Tribe Inc.
*
*/if ( !defined('ABSPATH') ) { die('-1'); } ?>
Any ideas? Am I even editing the right file?
September 10, 2013 at 10:35 am #65322Derek
ParticipantSettings -> Template -> Events Template.
*
* Override this template in your own theme by creating a file at [your-theme]/tribe-events/default-template.php
*
* @package TribeEventsCalendar
* @since 3.0
* @author Modern Tribe Inc.
*
*/if ( !defined(‘ABSPATH’) ) { die(‘-1’); } ?>
September 10, 2013 at 10:36 am #65323Derek
ParticipantI don’t know why it won’t show the whole thing…
September 10, 2013 at 10:37 am #65324Derek
ParticipantSeptember 10, 2013 at 11:01 am #65330Barry
MemberHi Derek – the forum doesn’t handle code very nicely at all, unfortunately, so it’s best to share code using a service like Pastebin, Gist or similar.
Please note that within your theme’s tribe-events directory there is no need for a further views directory – does that help to clarify things?
September 10, 2013 at 11:12 am #65336Derek
ParticipantNow I see why you used pastebin before! OK, I have it located here now…
/wp-content/themes/goinggreen/tribe-events/default-template.phpHere is the code I am using… http://pastebin.com/pTmr2wWB
September 10, 2013 at 11:18 am #65337Barry
MemberHi Derek,
So if that’s what you’re currently using it does indeed seem to be basically working, albeit the formatting is a bit off.
Note that in my example I had an opening div tag like so:
<div id="primary" class="site-content">You don’t have that in your snippet, but you do have the corresponding closing tag – so your HTML is basically “unbalanced” … does that help at all?
-
AuthorPosts
- The topic ‘Main Events Page with Sidebar’ is closed to new replies.
