1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Wordpress Child Theme Issue

Discussion in 'WordPress' started by kevb8ll, Sep 21, 2020.

  1. #1
    Hi

    I have created a child theme for my blog because I have been offered some advertising and need to hard code it. In truth should have done it before - but never mind.

    Anyway the child theme is working except for one thing - the background image on my post. It is a blog about a football team and I have a faded image as a background. However I can't find where I added it to replicate in the child theme. It's not in the style sheet, I've checked (which is why I posted here) - but I can't find it in the php files either. I really struggle with the inspector on FF, but tried it to see if I could see it but I can't.

    Can someone take a look and tell me where the damn thing is please? It's all a bit embarrassing asking about my own site - but I can't find it.

    https://joysandsorrows.co.uk/2020/07/so-what-now-for-blues/

    If you look at this post you will see the faded image repeated vertically. I just need to know where that it so I can add it to the child theme because the child theme isn't picking it up.

    I have switched to the main theme for now for the purpose of this post.

    Thanks Kev
     
    kevb8ll, Sep 21, 2020 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
  3. kevb8ll

    kevb8ll Active Member

    Messages:
    44
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    93
    #3
    Yep that's the image. I can't get the css to work.

    The css is:

    .mh-wrapper {
    padding: 30px;
    background: #fff;
    background-image: url("./images/2bluesbg.png");
    background-repeat: repeat-y;
    background-position: 50px 15px;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    }


    I thought that unless you add something different in the child theme style sheet, it will inherit the css from the parent theme.

    I tried adding it to the custom css in child theme customise page, not working. Also tried with the child style sheet - no good either.

    I expect I have either missed something or added something I shouldn't have done - but I can't see it.
     
    kevb8ll, Sep 21, 2020 IP
  4. Efetobor Agbontaen

    Efetobor Agbontaen Active Member

    Messages:
    136
    Likes Received:
    41
    Best Answers:
    5
    Trophy Points:
    85
    #4
    Style the body instead of mh-wrapper class.... Something like:

    body.custom-background{
    background: url('blah.png');
    }
    Code (markup):
     
    Efetobor Agbontaen, Sep 21, 2020 IP