WordPress.org

Support

Support » Themes and Templates » Removing Text from Header and adding a background image

Removing Text from Header and adding a background image

  • I just changed my theme and i am having two problems right now. I have the option to remove the header text under Appearance>Header but when i click “no” under “display text” it doesn’t do anything.

    Also i wanted to add a full screen custom background image. I edited the stylesheet like this:

    body {
    	background:#000000; url('/www/wp-content/themes/irrigation /images/custombg.jpg
    	font-family: verdana, arial, tahoma, sans-serif;
    	font-size: 8pt;
    	margin:20px;

    nothing changed. what do i need to do to add a fullscreen back ground image here?

    Thanks!

Viewing 15 replies - 1 through 15 (of 16 total)
  • what theme?

    http://www.w3schools.com/css/css_background.asp

    take care of the details, such as brackets, and where you position the semicolons ;

    oh sorry the theme is:

    Irrigation 1.1.0 by Dannci

    and the site is:

    spokenturd.com

    So i added it under “body” just like this and it still doesn’t appear:

    [please mark all code using backticks or the ‘code’ button]

    body {
    	background-image:url('/www/wp-content/themes/irrigation/images/custombg.jpg');
    	background-repeat:no-repeat;
    	background-position:center;
    	background:#000000;
    	font-family: verdana, arial, tahoma, sans-serif;
    	font-size: 8pt;
    	margin:20px;

    What went wrong?

    the ‘no’ under header text seems only to remove the site title; it leaves the tagline.

    to include the ‘on/off’ of the tagline, you would need to edit functions.php:

    <?php if ( 'blank' == get_header_textcolor() ) {
    ?> #header h1 a, #header .description {
     display: none;
    }

    and change this to:

    <?php if ( 'blank' == get_header_textcolor() ) {
    ?> #header h1 a, #header h2 {
     display: none;
    }

    this went wrong:

    background:#000000;

    this is still the background short code, which includes all parameters;

    in your case, this has to be:

    background-color:#000000;

    edit: and make sure, if this is the full style, to close it after the line with ‘margin’ with }
    – which, i can see, you have in your stylesheet.

    Thank you so much for your help but it’s still not working. It looks like this now:

    body {
    	background-image:url('/www/wp-content/themes/irrigation/images/custombg.jpg');
    	background-repeat:no-repeat;
    	background-position:center;
    	background-color:#000000;
    	font-family: verdana, arial, tahoma, sans-serif;
    	font-size: 8pt;
    	margin:20px;
    
    	}

    Got rid of the header text! Thank you! Still trying to figure out the back ground image though.

    my bad – i didn’t pay much attention to your background image url –

    you would either use an absolute url, such as:

    background-image: url("http://spokenturd.com/wp-content/themes/irrigation/images/custombg.jpg");

    or, if you use the background style in style.css of your theme, you could use a relative url, such as:

    background-image: url(images/custombg.jpg);

    nope neither worked. Here is the code from the top of the style sheet:

    /*
    Theme Name: Irrigation
    Theme URI: http://preuro.eu/irrigation/
    Description: Irrigation new smooth WordPress theme. A two-columned wordpress theme with customizable header. Fixed-width, two columns. In green-brown colour.
    Author: Dannci
    Author URI: http://preuro.eu
    version: 1.1.0
    Tags: green, dark, brown, two-columns, fixed-width, sticky-post, custom-header
    */

    /* basics */

    *{margin:0; padding:0;}

    body {
    background-image: url(images/custombg.jpg);
    background-repeat:no-repeat;
    background-position:center;
    background-color:#000000;
    font-family: verdana, arial, tahoma, sans-serif;
    font-size: 8pt;
    margin:20px;

    }

    h1 {font-size: 18pt;}
    h2 {font-size: 14pt;}
    h3 {font-size: 10pt;}
    h4 {font-size: 9pt;}

    Maybe I’m putting in the wrong spot? I tried a ton of variations on the URL too.

    you have this ‘minify’ plugin running – this might be stopping the changes to come through.

    this is what ends up in the browser:

    body{background-image:url("/wp-content/themes/irrigation/www/wp-content/themes/irrigation/images/custombg.jpg");background-repeat:no-repeat;background-position:center;background-color:#000;font-family:verdana,arial,tahoma,sans-serif;font-size:8pt;margin:20px}

    OK so i see what happened. It’s actually in the center of the page. You have to scroll down to see it. I want it to be full screen and static. So you can scroll down and the back ground image wont move. Any ideas?

    …oh and it only appears in safari. Not firefox. This is getting a little complicated for a background picture. Does anyone know any good plugins that will do this?

    css should do fine –

    background-attachment: fixed;

    and

    background-position: center top;

    (i see the background in IE7 and firefox as well)

    Got it! Thanks a lot!

    you are welcome 😉

    when you have done it once – it is actually quite easy 😉

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Removing Text from Header and adding a background image’ is closed to new replies.
Skip to toolbar