• Resolved morgantrinker

    (@morgantrinker)


    I inserted a background image into the body section of my css file, my goal being to have the image present on the left and right sides of the browser with the main content in the middle on a white background. You can see this at https://www.bhmbride.com.

    However, when you click on a blog post only the header section has the white background, the actual post is against the background image. How do I make the the page, the middle section, on every page of the site, have a white background so that the background image only shows up on the left and right sides. I cannot for the life of me find the section in my wp dashboard that has this code. I thought i just need to add a <div id=”page”> tag to the other pages but this hasn’t worked either.

    I appreciate your help

    ********
    STYLESHEET: relevant code

    body { background-image:url(‘https://www.bhmbride.com/wp-content/uploads/2011/02/SECONDSTRIPE.jpg&#8217;); font:13px Arial, Verdana, Helvetica, sans-serif; color:#494949; padding:0; margin:0; }

    /*=== Layout ===*/
    #page { width:970px; margin:0 auto; padding:0; background:#fff; }

Viewing 10 replies - 1 through 10 (of 10 total)
  • Josh Feck

    (@builtbynorthby)

    It looks like the YARPP plugin is throwing and error, which is affecting the document’s markup. Try disabling that plugin and see what happens.

    Thread Starter morgantrinker

    (@morgantrinker)

    thanks josh. Should the YARPP plugin be listed in the plugins section of my dashboard? B/c its not. I appreciate your help.

    Josh Feck

    (@builtbynorthby)

    It might be hardcoded into the theme.
    Here’s the error:
    Fatal error: Call to undefined function yarpp_sql() in /home6/bhmbride/public_html/wp-content/themes/lifestyle/lifestyle/single.php on line 80
    If you can paste the contents of the single.php file into wordpress.pastebin.com I can take a look and see what’s going on.

    Thread Starter morgantrinker

    (@morgantrinker)

    I pasted the code into the link you sent me for wordpress.pastebin. The post is titled ‘yarpp fatal error single.php’

    I really appreciate your help. I can email you the code also if you need me to.

    Thanks again.

    Josh Feck

    (@builtbynorthby)

    It looks like the theme you’ve chosen relies on the “Yet another related posts plugin” & the “popular posts” plugin. They might be hardcoded into the functions.php file, but I doubt it.
    You could either install those two plugins, or delete lines 77-88 (for the yarrp plugin) and delete lines 92-98 (for the popular posts plugin) from the single.php file.
    I suggest making a backup of that file (just in case), then remove the lines.
    After doing that, the coloured background image should stay inside of the container.

    First of all, if you don’t know how to fix the YARPP’s problem, then please deactivate it for now!

    Now! Trying to answer your question!

    Find this style “.post-excerpt” in your css file, add background-color: #FFFFFF; to it:

    background-color: #FFFFFF;

    .post-excerpt {background-color: #FFFFFF;}

    Another it to thing about adding the same white background color to this style as well:

    .box .content {background-color: #FFFFFF;}

    Also:

    #centercol {background-color: #FFFFFF;}}

    But, well.. I see you’ve messed a lot with width of your content areas! Probably this will help you to adjust it all! And just want to let you know that when testing a new blog or theme, it’s a good idea to add more posts and also include some widgets in the sidebar, it makes it more clear!

    Josh Feck

    (@builtbynorthby)

    First of all, if you don’t know how to fix the YARPP’s problem, then please deactivate it for now!

    Hesham, I think the problem is that there are calls to two plugins that are not installed. The calls are hardcoded into the single.php, with the idea that those plugins would be installed by the user. So there’s at least one missing </div>, and the footer isn’t being called either. It’s a markup problem, not the CSS.

    Thread Starter morgantrinker

    (@morgantrinker)

    I appreciate your suggestions Hesham.

    Josh, I deleted the lines you suggested and it fixed the problem. I really appreciate all your help. You’re awesome.

    Now…Here’s the updated single post page https://www.bhmbride.com/?p=35

    As you can see the center column is spilling into the right column where the search box is. Any idea how to fix that? Do I need to just make sure I only insert images that are 640px wide or is there a way for wordpress to automatically format the text and images to fit into that space?

    Josh Feck

    (@builtbynorthby)

    Most WordPress themes will set a maximum width for images to fit within a column. It looks like the theme you’re using doesn’t do that.
    Here’s how to fix it:
    At the end of the style.css file add this:
    .content img {
    max-width: 640px;
    }

    Thread Starter morgantrinker

    (@morgantrinker)

    Thanks, Josh. You’ve been a huge help. I’m glad some people will still help strangers.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Making the background of blog post section white’ is closed to new replies.