I need to create custom page template which will not have header background image

what I want to do – I want to have a slider set as a background image on my front page, but want all the rest of the pages not to have it (slider behind the title). Is there easier way to do that?

You can create a custom page template if you want. For instructions on that, read this documentation. You can also see a page template built into the theme for a good starting point. In your theme file, look at the file page-guestbook.php

Now, you also might be able to achieve your goal by using Custom CSS. Every WordPress page or post is assigned a unique class in the <body> tag. So for example, If I wanted to change the background image for my home page, I would insert the following Custom CSS.

// Change body background for a specific page with post_id == 2 {
    background: url("") repeat center top scroll;

// Remove header background for a specific page with post_id == 2 .site-header {
    background: none;


  • iLia Anossov

    Hi Chris

    I like the CSS solution.
    Can it be configured another way around – instead of listing pages that should not have title background image, making it as a default and list pages that do?
    And I just assumed, but can you confirm that I can actually use the responsive slider (layer slider) as a header background?

    • Chris Baldelomar

      Yes. In theme options, you could simply leave the background option values empty. Then, through your Custom CSS editor, you could set the background header image on specific pages.

      And no, there is no way to use the LayerSlider plugin as a background. Nor can it go in the header. If you have a unique feature that you would like be made a plugin, or included in the Canvas theme, make your requests

  • iLia Anossov

    can I put the slider here (its even better)

    theme options -> misc – top of the page

    and instruct CSS to show it only on selected pages?

    • Chris Baldelomar

      Your suggestion would not work. For what you are trying to do, I would suggest creating a new page template and change your HTML structure the way you need it to be. And if you do make changes to the theme files, just make sure you disable automatic updates so your changes do not get erased.

Leave a Reply to iLia Anossov Cancel reply

Your email address will not be published. Required fields are marked *