Home>Support>No header on shop page.

No header on shop page.

I have Vantage Premium installed and woocommerce. I have a meta slider on every page of my website. The slider shows up on every page except for the shop page which is the page I designated to show all of the products. How do I get it to show up?

I already have it checked on the bottom right of the shop page builder in wp-admin but it still didnt show up. thanks!

URL: http://www.alasheslife.com/shop/

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 9 years, 6 months ago Daniel
    Hi, I Work Here

    Hi Pilar,

    I have just checked your site and the meta slider is there.

    This problem sounds like it might be a caching issue. The first thing to check is server-side caching through plugins like W3 Total Cache, WP Super Cache, etc. If you have any of these caching/performance plugins installed, try clearing their cache and see if that helps.

    It might also be browser cache. Try clearing your browser cache, and then refreshing the page to see if that helps.

    You can read more about this sort of issue on the WordPress codex – http://codex.wordpress.org/I_Make_Changes_and_Nothing_Happens

    Let me know the outcome

    Cheers

  2. 9 years, 6 months ago Andrew Misplon
    Hi, I Work Here

    Hi Pilar

    Please try the following child theme:

    https://siteorigin.com/wp-content/uploads/2015/03/vantage-child-woo-shop-slider.zip

    Install via Appearance > Themes > Add New: Upload Theme.

    Activating a child theme will cause Customizer settings and the menu location to reset.

    With the child theme activated go to Appearance > Editor and edit functions.php. Be careful here. Find this line:

    echo '<div id="main-slider">' . do_shortcode("[metaslider id=18]") . '</div>'; 
    

    Change only the number 18 to the ID of your slider.

    Once you’re done, if everything is working you’d need to re-assign your menu and redo Customizer settings. If you make a mistake in functions.php the site will go white, no access. In that event, navigate via FTP to /wp-content/themes/ and delete the vantage-child folder. Access will be restored.

  3. 9 years, 6 months ago Pilar Davis

    Hi again

  4. 9 years, 6 months ago Andrew Misplon
    Hi, I Work Here

    How’d that got you for Pilar?

  5. 9 years, 6 months ago Pilar Davis

    Hey Andrew,I already have a child theme running. It's via a child theme configurator by lilaea media. Would your suggestion still apply to that child theme.
       If it's meant to be nothing can stop it. If it's not, anything will.

  6. 9 years, 6 months ago Andrew Misplon
    Hi, I Work Here

    Is there a functions.php file in your child theme? Head to Appearance > Editor to check that. If there is, insert this at the bottom:

    /**
     * Add a slider to the WooCommerce shop page.
     */
    function vantage_child_shop_slider() {
    	if ( is_shop() ) {
    		echo '<div id="main-slider">' . do_shortcode("[metaslider id=18]") . '</div>'; 
    	}
    }
    add_action('vantage_after_masthead', 'vantage_child_shop_slider');
    

    There shouldn’t be a closing PHP tag at the bottom of your functions.php file:

    ?>

    But if there is, my function must be inserted before the closing PHP tag.

  7. 9 years, 2 months ago Oliver Pust

    Hi Andrew,

    Your code did the job for me on the shop’s main page. What do I need to add to show sliders on category and product pages?

    Best regards
    Oliver

    • 9 years, 2 months ago Andrew Misplon
      Hi, I Work Here

      Hey Oliver

      To expand this we’ll be working with the WooCommerce conditional tags seen here:

      http://docs.woothemes.com/document/conditional-tags/

      /** * Add a slider to WooCommerce pages. */function vantage_child_shop_slider() {	if ( is_shop() ) {		echo '<div id="main-slider">' . do_shortcode("[metaslider id=18]") . '</div>'; 	}	if ( is_product_category() ) {		echo '<div id="main-slider">' . do_shortcode("[metaslider id=18]") . '</div>'; 	}		if ( is_product() ) {		echo '<div id="main-slider">' . do_shortcode("[metaslider id=18]") . '</div>'; 	}	}add_action('vantage_after_masthead', 'vantage_child_shop_slider');

      I’ve added two conditionals. One that covers all categories and another that covers all single products. As you can see in the WooCommerce page I link to, it’s possible to get a lot more details.

      Please be sure to add changes like this to a functions.php file in a child theme and not the parent.

      I haven’t tested the above snippet so ideally only add it if you have FTP access to your site. That way, you can quickly remove the child theme if a problem occurs.

      Let me know how you come along.

  8. 9 years, 2 months ago Oliver Pust

    Found out myself, but it shows the same slider on every product (category) page. Is there a way to show different sliders on different product (category) pages?

    Best regards
    Oliver

    /** * Add a slider to WooCommerce category pages. */function vantage_child_product_category_slider() {	if ( is_product_category() ) {		echo '' . do_shortcode("[metaslider id=2076]") . ''; 	}}add_action('vantage_after_masthead', 'vantage_child_product_category_slider');/** * Add a slider to WooCommerce product pages. */function vantage_child_product_slider() {	if ( is_product() ) {		echo '' . do_shortcode("[metaslider id=2076]") . ''; 	}}add_action('vantage_after_masthead', 'vantage_child_product_slider');
  9. 9 years, 2 months ago Andrew Misplon
    Hi, I Work Here

    Sure, so you saw in my snippet that the shortcode was the same each time. In your case, slider ID 2076. You’d need to manually set that each time. Unfortunately, no easier way to do this at the moment.

  10. 9 years, 2 months ago Andrew Misplon
    Hi, I Work Here

    Your code tags were almost correct you just need a forward slash at the end vs a backslash. I corrected now. Thanks :)

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More