WordPress.org

Ready to get started?Download WordPress

Forums

Removing Text from Header and adding a background image (17 posts)

  1. rustylincoln
    Member
    Posted 3 years ago #

    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!

  2. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    what theme?

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

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

  3. rustylincoln
    Member
    Posted 3 years ago #

    oh sorry the theme is:

    Irrigation 1.1.0 by Dannci

    and the site is:

    spokenturd.com

  4. rustylincoln
    Member
    Posted 3 years ago #

    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?

  5. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    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;
    }
  6. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    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.

  7. rustylincoln
    Member
    Posted 3 years ago #

    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;
    
    	}
  8. rustylincoln
    Member
    Posted 3 years ago #

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

  9. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    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);

  10. rustylincoln
    Member
    Posted 3 years ago #

    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.

  11. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    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}

  12. rustylincoln
    Member
    Posted 3 years ago #

    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?

  13. rustylincoln
    Member
    Posted 3 years ago #

    ...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?

  14. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    css should do fine -

    background-attachment: fixed;

    and

    background-position: center top;

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

  15. rustylincoln
    Member
    Posted 3 years ago #

    Got it! Thanks a lot!

  16. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    you are welcome ;-)

    when you have done it once - it is actually quite easy ;-)

  17. laptophobo
    Member
    Posted 2 years ago #

    Alchymyth,
    I'm also a neophyte when it comes to WP. I'm having the on-off text in header problem as Rusty. I'm using a theme called Notes Blog that has this added script in the theme's functions.php file:

    // The site header
    define('HEADER_TEXTCOLOR', '00FF00');
    define('HEADER_IMAGE', get_bloginfo('stylesheet_directory') . '/img/header-default.gif');
    define('HEADER_IMAGE_WIDTH', 960);
    define('HEADER_IMAGE_HEIGHT', 116);
    
    // The site header function
    function site_header_style() { ?>
            <style type="text/css">
                            		div#header {
                            background: url(<?php header_image(); ?>);
                    }
    
            </style><?php
    }
    // The admin header function
    function admin_header_style() { ?>
        <style type="text/css">
            #headimg {
                width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
                height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
            }
        </style><?php
    }
    // Enable!
    add_custom_image_header('site_header_style', 'admin_header_style');

    From this, can you see how I can make the on-off option work?
    Thanks much!

    NEVER MIND! I found the fix on this branch: http://wordpress.org/support/topic/removing-text-from-header?replies=11

Topic Closed

This topic has been closed to new replies.

About this Topic