WordPress.org

Forums

The Events Calendar
Thematic Sidebar not showing up in ANY view (10 posts)

  1. rwbennet
    Member
    Posted 4 years ago #

    I have literally tried everything. I have scoured the forums and google and cannot get an answer to this. I am using Thematic with a Child Theme and The Events Calendar. I grabbed the template files for gridview.php, list.php and single.php and placed them in an /events subfolder in my child theme. I can manipulate and everything works great, except no matter what I do I cannot show the sidebar. I even went-so-far as to replace the gridview.php code with a very simple thematic page template that works everywhere else, but not within the context of TEC. I've tried the very simple <?php get_sidebar(); ?> call right before get_footer() and nothing. I tried every variation of get_sidebar like get_sidebar('primary-aside'); and get_sidebar(1); and thematic_sidebar('primary-aside'); etc... I'm not a hardcore programmer but I'm also not a novice so I know I've tried all the obvious stuff. Is anyone else having issues with TEC and Thematic? I've tried the <?php include ... ?> method, I've tried manipulating the gridview.php in the plugin/views folder directly, I've tried placing the template override folder in the Thematic parent theme folder instead of my child theme, I've tried re-writing the templateChooser() public function in the tec.class.php file so that it directs the override to the theme directory itself instead of an /events/ subdirectory, thinking it might be a subfolder issue...nope.

    So at this point I will try anything. Let me clear things up though, THIS IS NOT A CSS issue...when I view source, the sidebar isn't even being called at all. I don't really care how it looks and what it does, I just want the thematic sidebar to show up and I'll take it from there. To be perfectly honest, at this point I don't care if someone knows a workaround, hard-code method or a plugin hack, I just want it to work. Here is my gridview.php template thus-far. I have it placed in a Child Theme of Thematic in the "events" folder, so /wp-content/themes/MY-THEME/events/gridview.php:

    <?php
    
     	global $spEvents;
    	$spEvents->loadDomainStylesScripts();
        // calling the header.php
        get_header();
    
        // action hook for placing content above #container
        thematic_abovecontainer();
    ?>
    
    		<div id="container">
    
    			<?php thematic_abovecontent(); ?>
    
    			<div id="content" class="calendar">
    			<img src="/eTool/wp-content/uploads/2010/12/header_calendar.jpg" />
    	            <?php
    
    	            // calling the widget area 'page-top'
    	            get_sidebar('page-top');
    
    	            the_post();
    
    	            thematic_abovepost();
    
    	            ?>
    
    				<div id="tec-content" class="grid">
    
    		<div id='tec-events-calendar-header' class="clearfix">
    			<h2 class="tec-cal-title"></h2>
    			<span>
    				<span class='tec-prev-month'>
    					<a href='<?php echo events_get_previous_month_link(); ?>'>
    					← <?php echo events_get_previous_month_text(); ?>
    					</a>
    				</span>
    
    				<?php get_jump_to_date_calendar( "tec-" ); ?>
    
    				<span class='tec-next-month'>
    					<a href='<?php echo events_get_next_month_link(); ?>'>
    					<?php echo events_get_next_month_text(); ?> →
    					</a>
    				</span>
    			</span>
    
    			<span>
    				<a class="ical" href="<?php bloginfo('home'); ?>/?ical=<?php echo $tecCatObject->slug; ?>"><?php _e('Outlook Import', $spEvents->pluginDomain) ?></a>
    				<a class='tec-button-off' href='/eTool/field-marketing/management-tools/event-list'><?php _e('Event List', $spEvents->pluginDomain)?></a>
    				<a class='tec-button-on' href='/eTool/field-marketing/management-tools/calendar'><?php _e('Calendar', $spEvents->pluginDomain)?></a>
    			</span>
    		</div><!-- tec-events-calendar-header -->
    		<?php
    		global $wp_query;
    		$tecCatObject = get_category( $wp_query->query_vars['cat'])
    		?>
    		<?php event_grid_view(); // See the plugins/the-events-calendar/views/table.php template for customization ?>
    	</div>
    	        <?php
    
    	        thematic_belowpost();
    
    	        // calling the comments template
           		if (THEMATIC_COMPATIBLE_COMMENT_HANDLING) {
    				if ( get_post_custom_values('comments') ) {
    					// Add a key/value of "comments" to enable comments on pages!
    					thematic_comments_template();
    				}
    			} else {
    				thematic_comments_template();
    			}
    
    	        // calling the widget area 'page-bottom'
    	        get_sidebar('page-bottom');
    
    	        ?>
    
    			</div><!-- #content -->
    
    			<?php thematic_belowcontent(); ?> 
    
    		</div><!-- #container -->
    
    <?php 
    
        // action hook for placing content below #container
        thematic_belowcontainer();
    
        // calling the standard sidebar
        thematic_sidebar();
    
        // calling footer.php
        get_footer();
    
    ?>

    http://wordpress.org/extend/plugins/the-events-calendar/

  2. ninjadoll
    Member
    Posted 4 years ago #

    I'm losing my sidebar on all calendar-related posts, too. Would love to know if there's a fix for it, I've tried just about everything. Fortunately I have a header-based top menu so I'm not at a complete loss, but not being able to show some things on the event pages is frustrating.

  3. rwbennet
    Member
    Posted 4 years ago #

    I ended up creating a new sidebar called sidebar-events.php. I then just called that sidebar directly in the gridview.php template with get_sidebar('events');. In the sidebar-events.php file I just copied the output styles using Firebug and then did an "if dynamic sidebar exists function" to call the main sidebar (in my case, the name of my main sidebar is 'Primary Aside'). Here is all the code I used in the sidebar-events.php template:

    <div id="primary" class="aside main-aside">
    	<ul class="xoxo">
    		<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar('Primary Aside') ) : else : ?>
    		<?php endif; //end if for sidebar widgets plugin check?>
    	</ul>
    </div>

    Hope that helps

  4. orladuncan
    Member
    Posted 4 years ago #

    I am having the same problem on my website, my sidebar is not displaying within my events pages (list, single, calendar, etc) and also my subsidiaries in my footer are not displaying either. I am running WP3.1, Thematic 0.9.7.7 and a custom child theme.

    I have built a few sites in the past with this 'the events calendar' plugin and they all displayed my sidebar perfectly. This led me to test using a previous version of Thematic (version 0.9.6.2) and voila.. my sidebars are displaying perfectly again.

    So, something has been fixed / changed in Thematic between version 0.9.6.2 and 0.9.7.7 which is causing the sidebar issue with 'the events calendar'. Unfortunately I am not a very good php coder so investigating this issue is out of my league. But I thought I would post here in case anyone else would like to give it a go.

    @rwbennet I tried your solution above and it works perfectly for my sidebar but not my subsidiary so unfortunately for now I will be using an old version of Thematic.

    Thanks for the help!

  5. ivar360
    Member
    Posted 4 years ago #

    I've got the same issue and want to try out this method.
    However, I don't know what the name of my main sidebar is, could anyone tell me how to find out?

  6. wlanni
    Member
    Posted 4 years ago #

    Hey folks,

    I just found this on the themeshaper forums:

    http://themeshaper.com/forums/topic/thematic-the-events-calendar-problems
    add the following to your functions.php

    <?php global $spEvents;
    
    remove_action( 'template_redirect', array($spEvents, 'templateChooser'), 1 ); ?>
  7. ivar360
    Member
    Posted 4 years ago #

    Thanks wlanni! I had pretty much give up but this solves the issue for me :D

  8. wlanni
    Member
    Posted 4 years ago #

    :D Awesome ivar! There's a lot of great solutions on the themeshaper forums for thematic development, I encourage you to bookmark their site and search there as well as here.

    anyway, cheers to that!

  9. tompanton
    Member
    Posted 4 years ago #

    Adding the remove_action code listed above just get's my TEC templates ignored altogether. After I added this code, my events listing became just a typical category listing using the standard category.php template with working sidebars.

    FYI, I made a copy of the TEC "views" folder within my theme folder and renamed it "events". That all works fine, but my sidebar never gets populated.

    I'm at a loss here. Any ideas?

    Thanks

  10. bleggate
    Member
    Posted 3 years ago #

    Copy of my single.php

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Both work for gridview layout sidebar-content and event layout of sidbar-content-sidebar

    This is for a child theme on Genesis and I also pull the comments field

    Hope this helps.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • The Events Calendar
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic