Viewing 6 replies - 1 through 6 (of 6 total)
  • It should be a CSS issue.

    CSS is fairly easy to understand just do a search for “background” and change it.

    The css file should be in the theme menu.

    As an example, your theme (assuming it is unedited) has a 3 part background, excluding the nav. The first tag you are looking for is
    body{color:#4D4946;font:13px/1.5 Georgia,Helvetica,Arial;background:url('https://themes.dapurpixel.com/velvet/themes/velvetsky/css/../img/vs-bg-main.png') no-repeat scroll center 77px #241706;text-align:left}
    Change background:url to the url you want. The rest is similar, find the tags and edit them.

    Thread Starter brandingpeople

    (@brandingpeople)

    Great advice! i appreciate! However, I did just that and ITS STILL hasn’t budged! ??

    Here’s the actually code:

    */
    define('HEADER_TEXTCOLOR', 'ffffff');
    define('HEADER_IMAGE', '%s/images/default-header.jpg'); // %s is the template dir uri
    define('HEADER_IMAGE_WIDTH', 940); // use width and height appropriate for your theme
    define('HEADER_IMAGE_HEIGHT', 156);
    add_custom_image_header('ess_header_background', 'ess_admin_header_background');
    
    function ess_header_background() {
    	?>
    	<style type="text/css">
            #header .wrap{
                background: url(' <?php header_image(); ?> ');
            }
    	</style>
    	<?php
    }
    
    function ess_admin_header_background(){
        ?><style type="text/css">
            #headimg {
                width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
                height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
            }
        </style><?php
    
    }
    
    /*

    And I’m trying to change that cream part to this:

    https://www.teacakeculture.com/wp-content/uploads/2011/09/bottom_background.png

    My first thoughts were to change a color hex tag but I don’t think its that.

    If you or anyone could help me. I thought I was pretty good at this.

    Thread Starter brandingpeople

    (@brandingpeople)

    I’ve tried to replace the new url with different areas above where there was

    background: url(' <?php header_image(); ?> ');
    }

    Thread Starter brandingpeople

    (@brandingpeople)

    Even here on the ‘theme-options.php’

    As shown here:

    // Hooking styling for Theme Option page
    add_action('admin_head', 'ess_admin_header');
    function ess_admin_header(){
    	global $menu;
    		if ((isset($_GET['page']) == 'essential_options') ) : ?>
    		<style>
    			#icon-essential_options{ background:url('https://www.teacakeculture.com/wp-content/uploads/2011/09/bottom_background.png;) no-repeat; }
    
    			.essential-options .form-table	{background:#efefef; margin:0 0 40px 0;}
    			.essential-options tr		{display:block; background:#f7f7f7; margin:10px;}
    		</style>
    	<?php 	endif;
    }
    
    /*

    To the best of my knowledge you can’t put PHP in CSS, so you will need to use the location of the file.

    You can use relative links, however I am partial to the full physical link. for example https://www.example.com/wp-content/uploads/bg.png

    To save you the time replace `#body .wrap {*snip*} in the CSS file, assuming the “cream bit” is the post body, with the code below.

    #body .wrap {
    background: url('https://www.teacakeculture.com/wp-content/uploads/2011/09/bottom_background.png');
    }

    As a further note when they say put code in backticks they mean these not “backticks” (the backtick is found on the top most left key on your standard US keyboard.
    Also blocks of code longer than about 5 lines are expected to be put in Pastebin

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Fixed the backticks.

    You can’t put PHP code in a CSS file, but you CAN link to a php FILE as a background URL if you wanted to.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How do I change the background of my wordpress theme?’ is closed to new replies.