Home>Support>Problem showing slider on blog page or woocommerce page

Problem showing slider on blog page or woocommerce page

Hi,
i’ve been looking on many template php files to find any solution but i’m still wasting my time.
Let me explain.
I’ve got a slider from meta slider in the homepage and in any other standard page and it work fine.
I wrote this in the header.php file:


But when I go to the blog page or the product page the slider disappear.
Where do I need to add the code ?
thanks for your help.

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

  1. 10 years, 2 months ago ben79

    problem with code tags…

    <body >
  2. 10 years, 2 months ago Andrew Misplon
    Hi, I Work Here

    Hi Ben

    Thanks for running Vantage.

    Each page in Vantage has a MetaSlider drop down in the right column. Use that to add a slider per page.

  3. 10 years, 2 months ago ben79

    Hi,
    I did it already. It works for standard page but not for blog category or woocommerce page.

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

    Running a full width slider for those pages is unfortunately a custom development task. We recommend https://codeable.io/ if you’d like to grab a quote. You’d need a child theme with a modified header file that has a conditional that loads a slider based on what type of page it is – that’s one way at least.

    Sorry I don’t have more.

  5. 10 years, 2 months ago ben79

    I tried this solution but it seems that woocommerce override a part of the header.php. Or maybe i’m totally nut…
    Wich php files are used when showing the shop page?

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

    header.php will be rendered on both regular and WooCommerce pages.

  7. 10 years, 2 months ago ben79

    This is what i wrote in the header.php to get the slider in the header:

  8. 10 years, 2 months ago ben79
  9. 10 years, 2 months ago ben79

    how you use the code tag? It’s not working.

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

    Hi Ben

    You need to write:

    square bracket code square bracket

    Then insert your code snippet

    then write square bracket forward slash code square bracket.

  11. 10 years, 2 months ago ben79

    This is exactly what i did. Do i need to write the tag for each line?

    [/code]

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

    No it should work as a block. Let me edit the thread and try resolve it.

  13. 10 years, 2 months ago ben79

    ok thanks

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

    Sorry, I’m not sure where the forum is battling with this. When you pasted above in code tags that worked. Is there perhaps another square bracket in your code snippet?
    Alternatively you could upload a text file to your media library and link to it.

  15. 10 years, 2 months ago ben79

    no, there is no brackets. Can you edit my post to see the code i pasted?

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

    I unfortunately can’t see any code in the admin either.

  17. 10 years, 2 months ago ben79

    Can you see this link?
    https://docs.google.com/document/d/1hWzT4LSdBRGIxQn0PdxxwJgbT_I-Ro8n2qAESHGvbVU/edit?usp=sharing

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

    I can, thank you.

    I don’t see a conditional statement there to render a slider based on the page or post type. I’m afraid we’re unable to develop this for you. We do our best to assist with very small, one or two line customisations but overall we don’t offer a theme customisation service and would recommend codeable.io in that event.

  19. 10 years, 2 months ago ben79

    Normally, if i don’t define conditions it would apply to any type of page. I’m i right?

  20. 10 years, 2 months ago ben79

    Ok i will digg in to set a condition to post type.
    Something like

    <?php if ( is_page() ) {...
  21. 10 years, 2 months ago Andrew Misplon
    Hi, I Work Here
    <?php vantage_render_slider() ?>

    Has to be removed. You need to handle slider rendering yourself:

    <?php if is_home() {
    				echo do_shortcode( '[metaslider id=1]' );
    			}
    			if is_woocommerce() {
    				echo do_shortcode( '[metaslider id=2]' );
    			}
    			?>

    WordPress Conditionals: http://codex.wordpress.org/Conditional_Tags
    WooCommerce Conditionals: http://docs.woothemes.com/document/conditional-tags/
    WordPress do shortcode: http://codex.wordpress.org/Function_Reference/do_shortcode

  22. 10 years, 2 months ago ben79

    Thanks a lot for your help. I’ll try this. all the best!

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

    For sure. Good luck.

  24. 10 years, 2 months ago ben79

    It finally works with this code:

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

    We’ll need to look into why that’s happening :)

    Stoked you made it work – all the best!

  26. 10 years, 2 months ago ben79

    GRRRrrrr! These tag really don’t want to do it right…

  27. 10 years, 2 months ago ben79

    Lol! no way it gonna work… [o(

    Maybe it’s just because i’m french… racist code !

    • 10 years, 1 month ago Joost_

      Hi,

      I’m trying to get the slider working on the blog page also.
      Can you please help me with the code?

  28. 10 years, 1 month ago Andrew Misplon
    Hi, I Work Here

    Hi Joost_

    Select the Default or Full Width page template in the right column, then select the Meta Slider you want from the Meta Slider drop down menu. Finally click over to the Page Builder tab and insert the Post Loop widget.

    For further assistance here please open a new support thread.

    Thanks.

  29. 10 years, 19 days ago Joey Sephora

    Did that work for you Joost? Anyone?

    This issue is making me lose my sanity. please help.

    • 10 years, 19 days ago Andrew Misplon
      Hi, I Work Here

      Hi Joey

      I sent through the same advice on another thread now, really quick to implement. Give it a go.

  30. 10 years, 17 days ago Joey Sephora

    Hi Andrew, which other thread?

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