• Resolved Marklcm

    (@marklcm)


    I have used your example twenty sixteen header with Meteor Slides included and added the slug as needed.
    The only change are those in the latest twenty sixteen file which has added esc_attr on a couple of lines.

    <div class="header-image">
    					<?php if ( is_front_page() ) : ?>
    						<?php if ( function_exists( 'meteor_slideshow' ) ) { meteor_slideshow( "page-1-header", ""); } ?>
    					<?php else : ?>
    						<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
    							<img src="<?php header_image(); ?>" srcset="<?php echo esc_attr( wp_get_attachment_image_srcset( get_custom_header()->attachment_id ) ); ?>" sizes="<?php echo esc_attr( $custom_header_sizes ); ?>" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>">
    						</a>
    					<?php endif; // End front page check. ?>
    				</div>

    The slideshow did not show up as expected. I tested it in a page with a shortcode and it worked fine, so the slideshow is correctly setup.

    The only way I could get it to show was when I set a placeholder header image in the customiser. Then the slideshow works as expected. The only trouble is that the placeholder image shows up on all other pages.
    The site isn’t live yet, but I was wondering if you have any ideas?

    https://ww.wp.xz.cn/plugins/meteor-slides/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Josh Leuze

    (@jleuze)

    Hi, thanks for pointing that out, I had the slideshow function in the wrong spot, inside the if statement for the get_header_image function. So the slideshow was only loading if there was a header image. I updated the Gist on Github so it will load the slideshow on the frontpage regardless of whether there is a header image set for the rest of the pages.

    Thread Starter Marklcm

    (@marklcm)

    many thanks

    Plugin Author Josh Leuze

    (@jleuze)

    You’re welcome!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘template tag in header’ is closed to new replies.