Home › Forums › Calendar Products › Events Calendar PRO › Broken Template
- This topic has 9 replies, 2 voices, and was last updated 12 years ago by
Barry.
-
AuthorPosts
-
February 20, 2014 at 5:37 am #106886
pheck
ParticipantHello,
Tried the search and looked into the FAQ, but nothing helpful. So I decided to post here:
I am currently setting up a new homepage for a local wine dealer. This one is currently installed in a playground. I am using the White Rock theme. Want to use the plugin to show events, unfortunately it breaks the design when I view the main event page (/events). Single events are displayed right.
Maybe you can have a look at: http://www.hanglage.de/wordpress/events/
When you compare it to: http://www.hanglage.de/wordpress/ueber
you can see, that the horizontal bar and the headline of the theme is not displayed. I even had to add some line breaks into the settings area (pre post html) to force the display not to overlap with the menu area at the top of the template (see line 171 – 174 of the page – here you can see 4 time “<p> </p>” in the code.
Already tried all the differnt combination on the setting area regarding standard style sheets and template pages to use – nothing changes the behaviour.
Anyone has an idea how to get it working? Don’t get me wrong – don’t need a solution, just an idea at which area I need to look into to start debuging. As I’m not a PHP developer but a more a sysadmin, I need some guidance in which PHP files I need to adopt what to include the plugin right into my template.
Greetings from Germany
Peter
February 20, 2014 at 5:59 am #106897pheck
ParticipantFound one thing – normally, I see the following section in the source code defining the page header:
<!– Page Title and Slider –>
<div id=”page-title”>
<div class=”width-container paged-title”>
<h1>Über uns</h1>
</div>
<div id=”page-title-divider”></div>
</div><!– #page-title –>
<div class=”clearfix”></div>
<script type=’text/javascript’>
jQuery(document).ready(function($) {
$(“#page-title”).backstretch([
“http://www.hanglage.de/wordpress/wp-content/uploads/2014/02/Hanglage1-1600×300.jpg”
],{
fade: 750,
duration: 8000 });
});
</script>
<!– End Page Title and Slider –>In the /events page I see:
<!– Page Title and Slider –>
<!– End Page Title and Slider –>
So it looks like, that this definition gets lost!
This one is defined in the header.php of the theme – here the code:
<!– Page Title and Slider –>
<?php if( is_page_template(‘homepage.php’) || is_page_template(‘page-blog-slider.php’) ): ?>
<?php get_template_part( ‘slider’, ‘progression’ ); ?>
<?php else: ?>
<?php get_template_part( ‘page-title’, ‘progression’ ); ?>
<?php endif; ?>
<!– End Page Title and Slider –>Not sure, what to do to include this part into the /events page.
February 20, 2014 at 9:15 am #107034Barry
MemberHi Peter,
Sorry to hear you are having difficulties. Please bear in mind I am in a sense “working blind” because I don’t have your theme in front of me, but let’s give something a try here (and, if you have not already done so, please read The Themer’s Guide for an overview of overriding templates).
- You are already using the Default Events Template by the looks of things (and this loads your theme’s header.php template
- Let’s override the Default Events Template (default-template.php)
- Above where it calls get_header(); try adding $GLOBALS[‘tribe-events-tpl’] = true;
- Now in your header.php template edit the conditional statement you referenced in your reply:
<?php if( is_page_template('homepage.php') || is_page_template('page-blog-slider.php') || isset($GLOBALS['tribe-events-tpl']) ): ?>- See if that helps – if it does not, we probably need to take a closer peek at either the slider/progression template or else the page-title/progression template as it looks like one of those must be being pulled in, and perhaps there is a further check in one of those that is throwing things
Does that help at all, or at least give you some ideas to explore?
February 20, 2014 at 11:08 am #107128pheck
ParticipantThis reply is private.
February 20, 2014 at 11:38 am #107146pheck
ParticipantBy the way – converted the site now to be active – so remove the /wordpress/ from the URLs
February 21, 2014 at 7:04 am #107958Barry
MemberSure: well if you could make the theme available as a downloadable .zip that would be great – please just share a link here, as a private reply if you prefer.
Thanks!
February 21, 2014 at 8:13 am #107990pheck
ParticipantThis reply is private.
February 21, 2014 at 10:07 am #108024Barry
MemberNo problem, thanks for sharing.
So let’s try keeping the same global variable strategy (declare it in default-template.php just as you already did) and edit page-title-progression.php (which you may prefer to do from within a child theme). On/around line 37 find:
<?php if(is_page()): ?>Try changing this to:
<?php if( is_page() || isset( $GLOBALS['tribe-events-tpl'] ) ): ?>One side effect is that you may see the title of the first available event when on month view, as an example, displaying prominently. You could workaround this by adding the following line in your wp-config.php file:
define( 'TRIBE_MODIFY_GLOBAL_TITLE', true );Does that help at all? It may admittedly not be the perfect solution, but hopefully you can see the effect it has and can tweak things from there.
February 22, 2014 at 1:30 am #108192pheck
ParticipantHi Barry,
helped halfway:
The header is now displayed (but without the background photo). When putting the “define” statement in the wp-config.php file, the headline in the header is not longer displayed at all and the event headline (with the link to the single view) on the first event is not displayed at all.
In addition – when I then klick on one event to display the details of the event, a 2nd header is displayed.
For the time being, I could live with the changes on the theme page but without the define statement – but it still didn’t integrate well.
Don’t want to continue to waste your time, will see, if I can manage to solve it by my own.
Cheers Peter
April 18, 2014 at 6:27 am #136110Barry
Member(Closing this out!)
-
AuthorPosts
- The topic ‘Broken Template’ is closed to new replies.
