Support » Fixing WordPress » Translucent container

  • ajcnicholls88

    (@ajcnicholls88)


    I’d like the main area of my page, my theme calls it the container, to be semi-transparent, so the background is slightly visible behind.

    How might I do this?

    I am using the Custom Community theme.

    My page is http://soundandmotionmag.com

Viewing 13 replies - 1 through 13 (of 13 total)
  • Andrew Bartel

    (@andrew-bartel)

    Ideally, create a child theme. If your theme has an area to add custom css this will probably work there too.

    div#container {
    background-color: rgba(24,24,24,0.8);
    }

    You can adjust the 0.8 up and down to increase or decrease the transparency, 1 being solid and 0 being completely transparent.

    ajcnicholls88

    (@ajcnicholls88)

    Oh god! Thank you, man, you’re awesome.

    ajcnicholls88

    (@ajcnicholls88)

    Another question if I may. Do you know how to make the author’s name show in articles?

    The only alternative I can think of is to give all the author’s categories.

    Andrew Bartel

    (@andrew-bartel)

    Sure, no need to add the categories. Does your theme have a single-post.php or a single.php?

    Since we’re going to be editing files, I’d strongly recommend you create a child theme before we get started.

    ajcnicholls88

    (@ajcnicholls88)

    Haha, making a child theme seems like it’ll be hours of work… is there a step by step guide!?

    ajcnicholls88

    (@ajcnicholls88)

    It has a single.php

    Andrew Bartel

    (@andrew-bartel)

    No it’s very simple, and once you make a critical error (even I do sometimes!) it’s really nice to be able to go back and retrieve the parent theme’s master copies of files. That, and it makes your theme update safe.

    Here’s a step by step guide: http://www.wpyogi.com/2011/04/step-by-step-guide-to-making-a-twentyten-child-theme/

    Just substitute your theme for twentyten in the example.

    Can you paste the contents of single.php in a pastebin and link to it here?

    ajcnicholls88

    (@ajcnicholls88)

    Here’s the single.php, unless I’ve done something wrong.

    http://pastebin.com/2sDU9GWf

    ajcnicholls88

    (@ajcnicholls88)

    Ok that step by step guide is making my head spin. I need to change my theme over for my website to do it? Seems so complicated to me.

    Andrew Bartel

    (@andrew-bartel)

    So, a child theme is just a way to overwrite specific sections of your main theme without actually altering the files in your main theme.

    For example, we’ll be creating a brand new single.php in your child theme that will be different from the single.php in your parent (current) theme. This is important because if you update your theme, it could overwrite the single.php file with a new version and erase all your changes.

    Here is a pastebin of a single.php that should display the author for you. If you ever install and use buddypress on your site, be sure to revert to the old single.php as it contains code to display the author, but only if buddypress is installed.

    http://pastebin.com/Mr64vNLc

    ajcnicholls88

    (@ajcnicholls88)

    That displays the author name twice, is there a way around it?

    http://soundandmotionmag.com/2013/02/01/band-review-audio-mime/

    Andrew Bartel

    (@andrew-bartel)

    Give this a try: http://pastebin.com/RYg1JUHz

    I did delete a line of code there please make a backup at least on a notepad file or something in case it doesn’t work out.

    ajcnicholls88

    (@ajcnicholls88)

    That doesn’t change anything differently to the last one.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Translucent container’ is closed to new replies.