WordPress.org

Ready to get started?Download WordPress

Forums

2011 theme / change bg-color of showcase page (15 posts)

  1. linux garage
    Member
    Posted 1 year ago #

    Hi there:

    What code would I use to change the background-color of one showcase page (showcase template) in the TwentyEleven theme ?

    I can change the background-color of a default page (default template) by adding to style.css: body.page-id-8 #page {background-color: #000102 }

    But the code does not work for a page set to showcase template.

    Thanks

  2. esmi
    Theme Diva & Forum Moderator
    Posted 1 year 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. First create a child theme for your changes. Or use a custom CSS plugin.

  3. linux garage
    Member
    Posted 1 year ago #

    Thanks Esmi.

    I'm already using a child theme.

    I've tried the code below but it does not work:

    body.page-id-606 #page-template-showcase-php {background-color: #000}

  4. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Try using Firefox with the Firebug add-on for this kind of CSS work. It will help you to identify what CSS (if any) is over-ruling the custom CSS:
    http://getfirebug.com/

  5. linux garage
    Member
    Posted 1 year ago #

    body.page-id-606 #template-showcase-php {background-color: #000}

    tried this and it does not work either

  6. linux garage
    Member
    Posted 1 year ago #

    The style.css in the child theme looks OK

    Checked out the page in firebug and it looks OK too.

    Not sure what to try next.

  7. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Try:

    body.page-id-606.page-template-showcase-php

  8. linux garage
    Member
    Posted 1 year ago #

    Thanks Esmi. body.page-id-606.page-template-showcase-php --- did not work

    The code below works for default template and sidebar template:

    body.page-id-606 #page {background-color: #000 }

    But when I set the page to showcase template the page is white with a black strip across the bottom of the page. And centered inside the black strip are the words: RECENT POSTS

    Any idea what might be going on ?

    Thanks again.

  9. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Unless you provide a link to a page demonstrating the problem, no one will be able to offer much in the way of assistance beyond general best guesses.

  10. linux garage
    Member
    Posted 1 year ago #

    This of course works in the html editor:

    <div style="background-color: #000;"> ... </div>

    But the wrapper (?) is white so I would need to change to wrapper to black for one page using the showcase template.

  11. linux garage
    Member
    Posted 1 year ago #

    Esmi, you've been super !!

    I am working on a new site in LAMP so my site is not yet on line.

    I stripped out part of the header.php (because I'm using my own).

    That might be the causing the problem.

    I'll give an update tomorrow as I'll need to do some tinkering.

  12. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Try:

    body.page-id-606.page-template-showcase-php #wrapper {background-color:#000;}

  13. linux garage
    Member
    Posted 1 year ago #

    Esmi, thanks so much for your help.

    It definitely appears that finding a way to change the wrapper color in the showcase template would be the solution.

    ----------------
    I've tried this:

    body.page-id-606.page-template-showcase-php #wrapper {background-color:#000;}

    and this:

    body.page-id-606 #wrapper {background-color:#000;}

    Both codes don't work.

    ------------------------

    I'm using the code below in the header.php (in the child theme)

    <body <?php if (function_exists('body_class')) body_class(); ?>>

    I switched to the longer code after reading your guide here

    http://codex.wordpress.org/User:Esmi/_Changing_Headers_with_body_class%28%29

    -------------------------

    I'd be great if I could use the showcase template with a different background color. But I can get the black background with the default template so I'll be OK

    -------------------------

    Once again, thanks so much for your help.

  14. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    It might help if you could post a link to the page in question

  15. linux garage
    Member
    Posted 1 year ago #

    Thanks Esmi,

    I am still working on the site using LAMP in my laptop.

    I'll send a link once I get it online. I don't have a hosting service yet and will look into it.

    I really appreciate your feed back and time you've put into this issue.

Topic Closed

This topic has been closed to new replies.

About this Topic