• Resolved Admiral

    (@aadmiral)


    Hello.

    I create custom template for the homepage (based on page.php). Added a page with a single logo (using this template) and in the settings chosen it as “home.”
    What classes do I need to add to css and change in the page code – to make this page unique?
    With Chrome DevTools I can make the background transparent:

    .main { background: none; }
    #page .container-inner { background: none; -webkit-box-shadow: 0; box-shadow: 0; }

    But have problems with the addition of new styles in css.

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi!

    You mean you want a unique CSS ID/Class to specify with for this page template? If you inspect the page when viewing it, look at the body tag classes. There is a specific class added for your page template, that you can use to specify the CSS.

    Ex:

    .page-template-page-templateschild-menu-php .main { background: none; }

    Thread Starter Admiral

    (@aadmiral)

    Hey.
    Yes, I want to create multiple pages (templates) that inherit all values of standard pages, except sizes and background that I want to set individually for each of them.
    I still do not understand how to fix this.
    Inspecting the home page I can see code like this: [body class="home page page-id-8 page-template page-template-page-templatesmainpage-php col-1c full-width topbar-enabled mobile-sidebar-hide chrome s1-collapse s2-collapse" style=""]
    Adding code from the example has no effect:
    .page-template-page-templatesmainpage-php .main { background: none; }

    Thread Starter Admiral

    (@aadmiral)

    Oh, gotcha!

    .page-template-page-templatesmainpage-php
    .main { background: none!important; }
    .container-inner { background: none!important; -webkit-box-shadow: none!important; box-shadow: none!important; }

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Homepage Custom Style’ is closed to new replies.