• Hi,
    I have a rather big problem with header sliders.
    All I need is a simple-styled and responsive slider to the header. I’m not very familiar with php code, so is there any other way to add slider easily?
    (For example, “Thethe image slider” was very easy. I didn’t have to code but then I noticed it’s not working on the smaller devices!)

    If there’s not any easy way, can someone give some advices where exactly and how to add the slider shortcode with conditional tags in header.php? (I have installed the plugin “Responsive slider” and I’m using Twenty eleven.)
    My site should look like this: responsive slider on the home page, featured images (just one header photo) on other pages. How do I shape the conditional tags in this case, so that the featured images do not show on the home page but on the other pages they do?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hristo Pandjarov

    (@hristo-sg)

    SiteGround Representative

    Hello,

    You can try adding it like this in your header.php file:

    <?php if (!is_home()) { php do_shortcode( '[responsive_slider]' ) } ?>

    This should render the slider on all pages but the index 🙂

    Thread Starter Papuanu

    (@papuanu)

    I would like to have it the other way around: only on the index 🙂

    And if you could tell me the exact line where it goes.

    thanks already!

    Thread Starter Papuanu

    (@papuanu)

    I still need help,

    here’s the header.php code:
    http://pastebin.com/MrLJqAwq

    Not a PHP expert myself, but if you want to use the Hristo code only on homepage you have to remove the exclamation mark in front of “is_home” so

    <?php if (is_home()) { php do_shortcode( ‘[responsive_slider]’ ) } ?>

    The ! means “not”. So now the code says:
    if (the page is home) then ( insert the code that calls the slider)

    Anyway, I don’t know if this code works, you have to test 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Responsive slider in header?’ is closed to new replies.