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 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=”https://gmpg.org/xfn/11″>
<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’ ); ?>
<?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 storefront_social_icons – 10
* @hooked storefront_site_branding – 20
* @hooked storefront_secondary_navigation – 30
* @hooked storefront_product_search – 40
* @hooked storefront_primary_navigation – 50
* @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 storefront_header_widget_region – 10
*/
do_action( ‘storefront_before_content’ ); ?>
<div id=”content” class=”site-content”>
<div class=”col-full”>
<?php
/**
* @hooked woocommerce_breadcrumb – 10
*/
do_action( ‘storefront_content_top’ ); ?>