WordPress.org

Ready to get started?Download WordPress

Forums

Translucent container (14 posts)

  1. ajcnicholls88
    Member
    Posted 1 year ago #

    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

  2. Andrew Bartel
    Member
    Posted 1 year ago #

    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.

  3. ajcnicholls88
    Member
    Posted 1 year ago #

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

  4. ajcnicholls88
    Member
    Posted 1 year ago #

    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.

  5. Andrew Bartel
    Member
    Posted 1 year ago #

    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.

  6. ajcnicholls88
    Member
    Posted 1 year ago #

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

  7. ajcnicholls88
    Member
    Posted 1 year ago #

    It has a single.php

  8. Andrew Bartel
    Member
    Posted 1 year ago #

    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?

  9. ajcnicholls88
    Member
    Posted 1 year ago #

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

    http://pastebin.com/2sDU9GWf

  10. ajcnicholls88
    Member
    Posted 1 year ago #

    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.

  11. Andrew Bartel
    Member
    Posted 1 year ago #

    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

  12. ajcnicholls88
    Member
    Posted 1 year ago #

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

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

  13. Andrew Bartel
    Member
    Posted 1 year ago #

    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.

  14. ajcnicholls88
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.