• Resolved jeffers81845

    (@jeffers81845)


    twentyfifteen-child theme. Been all over the forums and google looking for this solution. Want to {display:none;} the blog title text (clickable) and add a background image (logo.png, clickable) where the text was on the left sidebar for all of the pages, posts, etc. Not sure of logo.png size restrictions if any. I see where I can click off the text in the customizer but will that negate ability to add a background image in css? CSS solution, or header.php changes? thanks.

    seattlesmarty.com

Viewing 7 replies - 1 through 7 (of 7 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    If you don’t want the logo to be content managed then this can just be a CSS fix

    Thread Starter jeffers81845

    (@jeffers81845)

    andrew, i don’t need it to be content managed. tried css for .site-branding display:none; and that made the text go away, but can’t get a background image to work with .site-branding. logo.png is the file in library?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Yes, logo.png just needs to be in a place that you can access it. Preferably in your child theme folder.

    Try using text-indent to hide the text, then add a height and width for the background image

    Thread Starter jeffers81845

    (@jeffers81845)

    Thanks. logo.png shows in my twentyfifteen-child media library. Is that different than if it was in an images folder for the child theme on the server? With CSS how would I direct the url to the image if it’s in media library? In an images folder?
    background: url(images/logo.png);

    How will I know how many px to text-indent to hide the title text? Thanks again for staying with me on this.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Is that different than if it was in an images folder for the child theme on the server?

    nope

    With CSS how would I direct the url to the image if it’s in media library?

    Check your uploads folder to see where it is. Then just point to that in CSS, e.g.:

    background: url(/wp-content/uploads/..)

    How will I know how many px to text-indent to hide the title text?

    You don’t, that’s why you go for -999em

    Thread Starter jeffers81845

    (@jeffers81845)

    Got it, thanks. Here’s the preliminary CSS (just to make sure it worked). Can design a proper logo now that I know how the swap works. Should look cool. Need to play with positioning. Will work on that after I get the actual png logo designed.

    .site-branding {
        background-image: url(/wp-content/uploads/2015/08/logo.png);
        height: 300px;
        width: 300px;
        text-indent: -9999em;
        background-repeat:no-repeat;
    }

    Thanks again for the work-through. Jeff

    Thread Starter jeffers81845

    (@jeffers81845)

    Andrew, Positioned the logo so it’s almost centered on the sidebar, moved up slightly which translates to slightly left on the mobile version (looks good offset). should look great overall. 300X300 seems to be a good fit. Onward!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘swap out blog title text for .png logo’ is closed to new replies.