• Resolved adolfocc

    (@adolfocc)


    Hi everyone,

    I got this nice theme:

    https://www.elegantthemes.com/demo/?theme=Nimble

    and this slider:

    https://kreaturamedia.com/codecanyon/plugins/layerslider/

    and I’d like to insert the slider inside the header (instead of the default slider) in the home page, so, my only idea (wrong one) was to use an exclusive page (Full wide page) to my Home and to create a new header.php with a different name and the php code of this slider inside and then, to call it from the fullwidepage.php with the editor instead of the original header.php.

    In this way I got just an error in the php code.

    If I insert the slider php code in the normal header.php it works but I don’t want to show it in all pages of my menu. And if I use the shortcode in the container of the Home page editor, of course it doesn’t appear in the place of the original slider.

    I think maybe it’s so simple but my skills with WordPress are almost beginner.. that could be nice if someone share any idea with me,

    Thanks in advance! )

Viewing 6 replies - 16 through 21 (of 21 total)
  • I am using childishly simple theme.

    Hi,

    Put this code in your header.php but replace the middle line with the metaslider php code given to you (you can find it at the bottom right corner of the meta slider page).

    <?php if ( is_home() ):?>
    <?php echo do_shortcode(“[metaslider id=1]”); ?>
    <?php endif; ?>

    Hope that helps

    Sorry, not sure about your particular theme..

    tonyreyes

    (@tonyreyes)

    https://www.candlelighterssoco.com

    I want to change the purple heading in my page and replace it with a picture, i just don’t see where to do it, can anyone help!! is a wordpress theme from theme forest is the Wisdom theme, thank you

    casper14209

    (@casper14209)

    @tonyreyes
    This doesn’t quite apply to this thread, but your request is quite easy if you use inspect element.
    I recommend using Google Chrome.
    You’ll see that this is done in your style sheet on line 38 for the global image part

    span.grung {
    width: 100%;
    height: 176px;
    float: left;
    background-image: url(images/cloud.png);
    background-repeat: no-repeat;
    background-position: top center;
    position: absolute;
    z-index: 1;
    }

    The white highlights are also done in your stylesheet on line 195.

    #outer_wrapper {
    width: 100%;
    background: url(images/layers.png) no-repeat top center;
    position: relative;
    z-index: 2;
    }

    And the actual color part appears (hopefully) to be being pulled from a setting in the theme options because it is in the page at line 20.

    .backcolr, .sub-menu, span.current {
    background-color: #8200ad !important;
    }

    matzone

    (@matzone)

    @casper14209 … thanks for the ‘is_front_page()’

Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘How to insert slider in header.php to appear only in the Home page’ is closed to new replies.