Title: universalius's Replies | WordPress.org

---

# universalius

  [  ](https://wordpress.org/support/users/universalius/)

 *   [Profile](https://wordpress.org/support/users/universalius/)
 *   [Topics Started](https://wordpress.org/support/users/universalius/topics/)
 *   [Replies Created](https://wordpress.org/support/users/universalius/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/universalius/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/universalius/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/universalius/engagements/)
 *   [Favorites](https://wordpress.org/support/users/universalius/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Slider, Gallery, and Carousel by MetaSlider - Image Slider, Video Slider] Meta slider integration in header for specific pages](https://wordpress.org/support/topic/meta-slider-integration-in-header-for-specific-pages/)
 *  Thread Starter [universalius](https://wordpress.org/support/users/universalius/)
 * (@universalius)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/meta-slider-integration-in-header-for-specific-pages/#post-5758219)
 * Thanks Dave. I will try trough there.
 * Kind regards
 * Mads
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Slider, Gallery, and Carousel by MetaSlider - Image Slider, Video Slider] Meta slider integration in header for specific pages](https://wordpress.org/support/topic/meta-slider-integration-in-header-for-specific-pages/)
 *  Thread Starter [universalius](https://wordpress.org/support/users/universalius/)
 * (@universalius)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/meta-slider-integration-in-header-for-specific-pages/#post-5758217)
 * Sure, I am using storefront with woocommerce. I am not sure what you mean about
   creating the same header.php file, since the woocommerce header.php cannot be
   overwritten. Unfortunately. But I have been overwriting my header.php for the
   storefront theme.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Slider, Gallery, and Carousel by MetaSlider - Image Slider, Video Slider] Meta slider integration in header for specific pages](https://wordpress.org/support/topic/meta-slider-integration-in-header-for-specific-pages/)
 *  Thread Starter [universalius](https://wordpress.org/support/users/universalius/)
 * (@universalius)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/meta-slider-integration-in-header-for-specific-pages/#post-5758214)
 * …I should point out that the below code you gave me, IS WORKING for other no 
   woocommerce related pages. It’s only my product page which is struggling.
 *     ```
       <?php
   
       if ( is_front_page() && is_home() ) {
         // Default homepage
       } elseif ( is_front_page() ) {
         // static homepage
         echo do_shortcode("[metaslider id=123]"); // Replace 123 with the slider ID to display on the homepage
       } elseif ( is_home() ) {
         // blog page
       } elseif ( is_page('page-slug') ) {
         // page with slug page-slug
         echo do_shortcode("[metaslider id=123]"); // Replace page-slug and 123 with your specific page
       } elseif ( is_page('another-page-slug','or-this-page','Or by page title') ) {
         // page with slug page-slug
         echo do_shortcode("[metaslider id=123]"); // You can add as many other pages as you like
       }
   
       ?>
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Slider, Gallery, and Carousel by MetaSlider - Image Slider, Video Slider] Meta slider integration in header for specific pages](https://wordpress.org/support/topic/meta-slider-integration-in-header-for-specific-pages/)
 *  Thread Starter [universalius](https://wordpress.org/support/users/universalius/)
 * (@universalius)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/meta-slider-integration-in-header-for-specific-pages/#post-5758213)
 * Hi Dave. Thanks for the code. As you pointed out, the problem is more related
   to the use of a different header.php file for woocommerce. Its placed inside /
   themes/inc/structure/header.php, but it seems like this file cannot be override
   from a child header. Is there actually a way to make slider appear on the storefron/
   woocommerce product page?
 * Kind regards
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Slider, Gallery, and Carousel by MetaSlider - Image Slider, Video Slider] Meta slider integration in header for specific pages](https://wordpress.org/support/topic/meta-slider-integration-in-header-for-specific-pages/)
 *  Thread Starter [universalius](https://wordpress.org/support/users/universalius/)
 * (@universalius)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/meta-slider-integration-in-header-for-specific-pages/#post-5758205)
 * There is still no slider showing on other pages than the frontpage. I made sure
   my permalinks was ok and I am using “page_id=5 for my product page. THe stylesheet
   is the same, with the same header-file. It seems very strange. Can you see any
   errors in the header.php here? Is there a way that i can use the functions.php
   for pasting the slider code instead?
 * <?php
    /** * The header for our theme. * * Displays all of the <head> section
   and everything up till <div id=”content”> * * [@package](https://wordpress.org/support/users/package/)
   storefront */ ?><!DOCTYPE html> <html <?php language_attributes(); ?> <?php storefront_html_tag_schema();?
   >> <head> <meta charset=”<?php bloginfo( ‘charset’ ); ?>”> <meta name=”viewport”
   content=”width=device-width, initial-scale=1″> <link rel=”profile” href=”[http://gmpg.org/xfn/11″&gt](http://gmpg.org/xfn/11″&gt);
   <link rel=”pingback” href=”<?php bloginfo( ‘pingback_url’ ); ?>”>
 * <?php wp_head(); ?>
    </head>
 * <body <?php body_class(); ?>>
    <div id=”page” class=”hfeed site”> [<?php _e( ‘Skip to content’, ‘storefront’ ); ?>](https://wordpress.org/support/users/universalius/replies/?output_format=md#content)
 *  <?php
    do_action( ‘storefront_before_header’ ); ?>
 *  <header id=”masthead” class=”site-header” role=”banner” <?php if ( get_header_image()!
   = ” ) { echo ‘style=”background-image: url(‘ . esc_url( get_header_image() ) .‘);”‘;}?
   >>
    <div class=”col-full”>
 *  <?php
    /** * [@hooked](https://wordpress.org/support/users/hooked/) storefront_social_icons–
   10 * [@hooked](https://wordpress.org/support/users/hooked/) storefront_site_branding–
   20 * [@hooked](https://wordpress.org/support/users/hooked/) storefront_secondary_navigation–
   30 * [@hooked](https://wordpress.org/support/users/hooked/) storefront_product_search–
   40 * [@hooked](https://wordpress.org/support/users/hooked/) storefront_primary_navigation–
   50 * [@hooked](https://wordpress.org/support/users/hooked/) storefront_header_cart–
   60 */ do_action( ‘storefront_header’ ); ?>
 *  </div>
    </header><!– #masthead –> <?php
 * if ( is_front_page() && is_home() ) {
    // Default homepage } elseif ( is_front_page()){//
   static homepage echo do_shortcode(“[metaslider id=30]”); // Replace 123 with 
   the slider ID to display on the homepage } elseif ( is_home() ) { // blog page}
   elseif ( is_page(‘page_id=5’) ) { // page with slug page-slug echo do_shortcode(“[
   metaslider id=228]”); // Replace page-slug and 123 with your specific page } 
   elseif ( is_page(‘page_id=5’) ) { // page with slug page-slug echo do_shortcode(“[
   metaslider id=228]”); // You can add as many other pages as you like }
 * ?>
 *  <?php
    /** * [@hooked](https://wordpress.org/support/users/hooked/) storefront_header_widget_region–
   10 */ do_action( ‘storefront_before_content’ ); ?>
 *  <div id=”content” class=”site-content”>
    <div class=”col-full”>
 *  <?php
    /** * [@hooked](https://wordpress.org/support/users/hooked/) woocommerce_breadcrumb–
   10 */ do_action( ‘storefront_content_top’ ); ?>
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Slider, Gallery, and Carousel by MetaSlider - Image Slider, Video Slider] Meta slider integration in header for specific pages](https://wordpress.org/support/topic/meta-slider-integration-in-header-for-specific-pages/)
 *  Thread Starter [universalius](https://wordpress.org/support/users/universalius/)
 * (@universalius)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/meta-slider-integration-in-header-for-specific-pages/#post-5758190)
 * Hi Dave. I have tried with the code above and onto different places of my header.
   php, but unfortunately there is no slider showing. No output at all.
 * Any other adeas?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Slider, Gallery, and Carousel by MetaSlider - Image Slider, Video Slider] Meta slider integration in header for specific pages](https://wordpress.org/support/topic/meta-slider-integration-in-header-for-specific-pages/)
 *  Thread Starter [universalius](https://wordpress.org/support/users/universalius/)
 * (@universalius)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/meta-slider-integration-in-header-for-specific-pages/#post-5758187)
 * The first part of the code, does work for my frontpage, but the elseif statements
   dont go through. I have even tried using: is_page(‘page_id=5’)
 * Have you got an idea whats wrong?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Slider, Gallery, and Carousel by MetaSlider - Image Slider, Video Slider] Meta slider integration in header for specific pages](https://wordpress.org/support/topic/meta-slider-integration-in-header-for-specific-pages/)
 *  Thread Starter [universalius](https://wordpress.org/support/users/universalius/)
 * (@universalius)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/meta-slider-integration-in-header-for-specific-pages/#post-5758155)
 * Hi Matcha. Thanks for the code, but it only seem to work for my frontpage. I 
   assume the slug-page, is what I define in wordpress backend, inside Pages > “
   quick edit” specific page > “Slug” name?s
 * I then pasted the slug name into the code as seen below. However, the metaslider
   id=174 slider is not showing under my Product page. Can you tell why?
 * ——————–
    <?php
 * if ( is_front_page() && is_home() ) {
    // Default homepage } elseif ( is_front_page()){//
   static homepage echo do_shortcode(“[metaslider id=30]”); // Replace 123 with 
   the slider ID to display on the homepage } elseif ( is_home() ) { // blog page}
   elseif ( is_page(‘siloprodukter’) ) { // page with slug page-slug echo do_shortcode(“[
   metaslider id=174]”); // Replace page-slug and 123 with your specific page } 
   elseif ( is_page(‘another-page-slug’,’or-this-page’,’Or by page title’) ) { //
   page with slug page-slug echo do_shortcode(“[metaslider id=123]”); // You can
   add as many other pages as you like } ?> ————–
 * Kind regards!

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