Broken Template

Home Forums Calendar Products Events Calendar PRO Broken Template

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #106886
    pheck
    Participant

    Hello,

    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

    #106897
    pheck
    Participant

    Found 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&#8221;
    ],{
    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.

    #107034
    Barry
    Member

    Hi 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?

    #107128
    pheck
    Participant

    This reply is private.

    #107146
    pheck
    Participant

    By the way – converted the site now to be active – so remove the /wordpress/ from the URLs

    #107958
    Barry
    Member

    Sure: 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!

    #107990
    pheck
    Participant

    This reply is private.

    #108024
    Barry
    Member

    No 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.

    #108192
    pheck
    Participant

    Hi 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

    #136110
    Barry
    Member

    (Closing this out!)

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Broken Template’ is closed to new replies.