Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter gkd720

    (@gkd720)

    Thanks for the method. With disabled comments, the “Leave a comment” link displays the post without any prompt or input boxes to leave one, so it’s only mildly misleading. So, I just stuck with that. Thanks again.

    Thread Starter gkd720

    (@gkd720)

    Update: I tried turning off comments for all future posts in Settings -> Discussions -> Unchecking “Allow comments . . .”, and then added another post, but it too has “Leave a comment”, even after Empty Caches. Any thoughts on what’s going on? Thanks.

    Thread Starter gkd720

    (@gkd720)

    @cavalierlife: Thanks. A Safari -> Develop -> Empty Caches cleared things up. This probably explains most of the weirdness I’ve been seeing. Not sure if your “page-id-52” missing the leading dot is a typo, but it looks like I do need the dot to work.

    @childthemestyles: Thanks. The page-id-52 and site-content-contain classes now select the correct, and only, page to affect.

    Thread Starter gkd720

    (@gkd720)

    The style.css looks syntactically OK, and I added my stuff at the end, at the “top” level, outside of any class-specific formatting.

    I used the “Inspect element” in Firefox and poked around. The section I want to change the background color of seems to be a specific “div” element. Its code is below. The page has a couple of <style> specifications above this code, but nothing that looks like it generally affects the background.

    <div class="site-content-contain">
    <div id="content" class="site-content">
    <div class="wrap">
    <div id="primary" class="content-area">
    <main id="main" class="site-main" role="main">
    <article id="post-52" class="post-52 page type-page status-publish hentry">
    

    So, in style.css, I tried the below code (with and without the “div”), but still to no avail:

    div.site-content-contain { background-color: #f00 !important; }

    OK, so I went back and tried putting some formatting in using the suggested “dashboard – appearance – customize – additional CSS”, and this actually did something. Although it now has the whole site with a red background (I see there’s more than one div called site-content-contain), but at least I was able to affect something. I need to limit it to that specific page. I tried just doing it to the page’s body class with:

    .page-id-52 { background-color: #f00 !important; }

    but that didn’t work. Although, sliding the whole page down a little (two-finger drag down in Mac OS) does reveal red behind the top image, so it’s doing something.

    So any more guidance on how to select a specific body/div element? Thanks.

    Thread Starter gkd720

    (@gkd720)

    Hmmm, this isn’t a real site. It’s just me playing around with WordPress on my laptop for a class I’m taking. So not sure how to expose to you. Anything I might try, or any experiments that would shed some light on what’s going on? Thanks.

    Wow, thanks @-avocado. This works great. I was trying the slider template code in numerous various files (header.php, lower level php files, etc.) and nothing worked until this.

Viewing 6 replies - 1 through 6 (of 6 total)