• Resolved gebseng

    (@gebseng)


    Hi everyone,

    I followed an old thread in this forum to integrate Meta Slider into the header of the Twenty Seventeen theme.

    I am running WordPress 4.9.6 with a Twenty Seventeen child theme and the Meta Slider 3.7.2 plugin

    I inserted this line at the bottom of the header.php:

    <?php
    echo do_shortcode(“[metaslider id=144]”);
    ?>

    Unfortunately, this places the Slider not into Twenty Seventeen’s header, but below:

    https://fotosengmueller.com/wp/

    It would be great to hear from you on this,

    best,

    geb

    The page I need help with: [log in to see the link]

Viewing 4 replies - 16 through 19 (of 19 total)
  • Hello there @kbat82,

    I wonder if you could help me? I made a Twenty seventeen child theme and I tried to put a slider on the header. I modified the header-image.php file and exchanged the <?php the_custom_header_markup(); ?> line into <?php echo do_shortcode('[metaslider id="799"]'); ?>. I then recreated the folders
    structure (/wp-content/themes/twentyseventeen_child/template-parts/header) and placed the header-image.php there. The modification worked, BUT now there’s no more header image on any other page of the site, nor a slider. What could I do to solve this issue? The site is drcstudio (Enricolino to view it).

    Thanks in advance

    Cheers

    Enrico

    • This reply was modified 6 years, 6 months ago by enricolino.

    Hi. Doing my best to follow this exchange as I’m trying to do precisely the same thing and don’t want to mess up by breaking things in the php. Any chance you could simplify/spell out the process for replacing the Storefront homepage banner with a slider. I can see most of the pertinent info is in this thread but can’t quite follow the sequence. Many thanks.

    Hi @patboran,

    If you need to reply further, can you instead open your own issue so others aren’t being notified with replies?

    I don’t know about the Storefront theme specifically, but usually it involves editing a header.php file and replacing the image with the shortcode:
    [metaslider id=XXX restrict_to=home]

    You might need it to be using php, so you can use this:
    <?php echo do_shortcode(‘[metaslider id=XXX restrict_to=home]’); ?>

    And if you need to use more logic, use basic php and WP for that:

    <?php
    if (is_front_page()) {
      // the code for the slideshow to show
      echo do_shortcode('[metaslider id=XXX restrict_to=home]');
    } else {
      // The code for the image to show on other pages
    }

    Hi, I have the same question: I want to use the meta slider and get the original Site title and Tagline on top of that slide show. Is there a solution yet and if yes, can you summarize it? I think this is a very common need….

Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘Meta Slider in Twenty Seventeen header’ is closed to new replies.