WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Twenty Eleven header image to a slider (11 posts)

  1. YoussefSiblini
    Member
    Posted 2 years ago #

    Hi,
    I am new to WordPress, I want to change the top image in the showcase page to a slider, but if I changed that in the header.php the changes happens to all pages, how can I limit that changes to the showcase.php only?

    Jo

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    Do not edit the Twenty Eleven theme. It is the default WordPress theme and having access to an unedited version of the theme is vital when dealing with a range of site issues. Create a child theme for your changes. Once your child theme is active, we should be able to help with the customisation.

  3. YoussefSiblini
    Member
    Posted 2 years ago #

    Hi,
    Thank you for your reply,
    I created a child theme and name it kabbanilifestyle.
    Inside this folder I created a style.css file and added inside it:

    [CSS moderated as per the Forum Rules. Please just post a link to your site.]

    but how will I achieve my goal by changing the header in the home page only (replacing the header image with a slider without effecting the other pages).

    Jo

  4. esmi
    Forum Moderator
    Posted 2 years ago #

    By creating a custom header.php template file in your child theme.

  5. YoussefSiblini
    Member
    Posted 2 years ago #

    Wouldn't all the pages dynamically pick it and the original one.

    Sorry I am quite newb with all this.

    Jo

  6. YoussefSiblini
    Member
    Posted 2 years ago #

    I meant like the original one.

  7. esmi
    Forum Moderator
    Posted 2 years ago #

    Wouldn't all the pages dynamically pick it and the original one.

    No. That's how child themes work. The templates in the child are used first.

  8. YoussefSiblini
    Member
    Posted 2 years ago #

    OK, Just one last question and I can do it, Is there a way to tell the header.php that if it come from the static page do this else do some thing different.
    like:
    if(staticpage)
    {
    do this
    }
    else // which will be the other pages
    {
    do some thing else.
    }

    Jo

  9. esmi
    Forum Moderator
    Posted 2 years ago #

  10. YoussefSiblini
    Member
    Posted 2 years ago #

    THANK YOU, It is working, thank you sooooooo much, you are so helpful.

    Jo

  11. esmi
    Forum Moderator
    Posted 2 years ago #

    Glad I could help :-)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.