• Resolved janem706

    (@janem706)


    Hi there, how can I enable the header image slider to be on my website’s front-page / homepage only? It seems like the header appears in all other pages as well, but I would only like it to be on the frontpage.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Anoop Ranawat

    (@anoopranawat)

    Hello @janem706

    Thanks for reaching here.

    You can add shortcode in the front page condition like this way

    if ( is_front_page() ) {
      echo do_shortcode('[sp_imageslider]');
    }

    Thanks

    Thread Starter janem706

    (@janem706)

    Hi Anoop, thanks for your swift reply. Do I add this shortcode to the header.php file?

    Plugin Author Anoop Ranawat

    (@anoopranawat)

    Hello @janem706,

    Yes

    Thread Starter janem706

    (@janem706)

    Hi Anoop, unfortunately, it still doesn’t work. When I input my code into the editor and proceed to check my website, the entire code appears at the position that my header used to be at, instead of my header. Any advice on how to amend this? I am editing on the child theme of Storefront (Boutique), if that is of any help.

    • This reply was modified 6 years, 1 month ago by janem706.
    Plugin Author Anoop Ranawat

    (@anoopranawat)

    Hello @janem706

    I think you have added code without PHP tag (<?php ?>)

    Please add this way

    
    <?php 
    
      if ( is_front_page() ) {
        echo do_shortcode('[sp_imageslider]');
      }
    
    ?>

    Thanks

    Thread Starter janem706

    (@janem706)

    My bad, that was what I forgot indeed. Thank you so much for your kind assistance and patience Anoop – it works just fine now! ??

    Plugin Author Anoop Ranawat

    (@anoopranawat)

    Hello @janem706

    If you like our plugin and support please give us review and rate.

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Enable Header to be on Frontpage only’ is closed to new replies.