• Resolved Louis Wolmarans

    (@louiswol94)


    Hi there,

    Thank you for an awesome plugin. ?? I just have what I hope is a minor glitch…

    I created my Theme in Artisteer… Now I wanted different slides on different pages.

    I added this code in my header.php file: (I replaced the normal slider code with this php)

    <div class="art-pageslider">
    
         <div class="art-shapes">
                </div>
    <div class="art-slider art-slidecontainerpageslider" data-width="780" data-height="272">
        <div class="art-slider-inner">
     <?php if (is_front_page()) : ?>
            <?php if ( function_exists( 'meteor_slideshow' ) ) { meteor_slideshow("F1 GP Slide", ""); } ?>
    
            <?php elseif is_page(array('38','39','40','41','42','43','44','45','46','47','48','49','50','51','52','53')) : ?>
            <?php if ( function_exists( 'meteor_slideshow' ) ) { meteor_slideshow("Moto GP Slide", ""); } ?>
    
    		<?php elseif is_page(array('55','124','125','126','127','128','129')) : ?>
            <?php if ( function_exists( 'meteor_slideshow' ) ) { meteor_slideshow("Le Mans Slide", ""); } ?>
    
            <?php else : ?>
            <?php if ( function_exists( 'meteor_slideshow' ) ) { meteor_slideshow("F1 GP Slide", ""); } ?>
    
       <?php endif; ?>
    
        </div>
    </div>
    <div class="art-slidenavigator art-slidenavigatorpageslider" data-left="0.5" data-top="1">
    <a href="#" class="art-slidenavigatoritem"></a><a href="#" class="art-slidenavigatoritem"></a><a href="#" class="art-slidenavigatoritem"></a><a href="#" class="art-slidenavigatoritem"></a><a href="#" class="art-slidenavigatoritem"></a>
    </div>
    
    </div>

    Now my webpages are not loading in the frontend… None of them.

    But my WP Admin backend is loading… Any ideas?

    Thanks!

    https://www.ads-software.com/plugins/meteor-slides/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Louis Wolmarans

    (@louiswol94)

    Plugin Author Josh Leuze

    (@jleuze)

    Two things here, first, to load a specific slideshow, you should use the slideshow slug, not the title. The slugs should be lowercase with hyphens between them.

    Second, the formatting of the conditionals is very important, each if or elseif statement should have parenthesis after them, with the conditionals and any parenthesis for the conditionals within the if’s parenthesis, just like the first conditional here:

    <?php if ( is_front_page() ) : ?>

    This should work better:

    <div class="art-pageslider">
    
        <div class="art-shapes"></div>
    
        <div class="art-slider art-slidecontainerpageslider" data-width="780" data-height="272">
            <div class="art-slider-inner">
                <?php if ( is_front_page() ) : ?>
                    <?php if ( function_exists( 'meteor_slideshow' ) ) { meteor_slideshow("f1-gp-slide", ""); } ?>
    
                <?php elseif ( is_page( array( '38','39','40','41','42','43','44','45','46','47','48','49','50','51','52','53' ) ) ) : ?>
                    <?php if ( function_exists( 'meteor_slideshow' ) ) { meteor_slideshow("moto gp-slide", ""); } ?>
    
                <?php elseif ( is_page( array( '55','124','125','126','127','128','129' ) ) ) : ?>
                    <?php if ( function_exists( 'meteor_slideshow' ) ) { meteor_slideshow("le-mans-slide", ""); } ?>
    
                <?php else : ?>
                    <?php if ( function_exists( 'meteor_slideshow' ) ) { meteor_slideshow("f1-gp-slide", ""); } ?>
                <?php endif; ?>
            </div>
        </div>
    
        <div class="art-slidenavigator art-slidenavigatorpageslider" data-left="0.5" data-top="1">
            <a href="#" class="art-slidenavigatoritem"></a><a href="#" class="art-slidenavigatoritem"></a><a href="#" class="art-slidenavigatoritem"></a><a href="#" class="art-slidenavigatoritem"></a><a href="#" class="art-slidenavigatoritem"></a>
        </div>
    
    </div>

    Thread Starter Louis Wolmarans

    (@louiswol94)

    You’re a legend Josh! I’ll find the donate button! ??

    Plugin Author Josh Leuze

    (@jleuze)

    You’re welcome!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Pages don't load after inserting php into header.php file’ is closed to new replies.