• Hi I would like to put my own background image on the Gear theme. Could you help me to do that? I can’t understand the css file really well…

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi

    If you mean replace the black background in your header with an image, you can do it like this

    The code appears to be in your header.php file, although it could be in another file that is being included in your header.php file.

    The line of code is this one
    .header {
    background: black url(https://joaniemoore.com/wp/wp-content/themes/gear/images/header-pattern.gif) repeat-x scroll 0 0;
    }
    put the image you want in the background in the images folder in your theme file /wp-content/themes/{themename}/images
    and replace header-pattern.gif with the new file’s filename.

    The line is NOT in your style.css theme file.

    Post content deleted. I figured out the answer to my question by reading the prior post more carefully, and I don’t see any way to delete the entire post.

    P.S. I’m very new to WP and am just trying to learn how themes work.

    Sorry, I am a newb…

    nnamazi, what you described there is not in my header.php but in my style.css. My header.php is just this:

    <?php
    global $options;
    foreach ($options as $value) {
    if (get_settings( $value[‘id’] ) === FALSE) { $$value[‘id’] = $value[‘std’]; } else { $$value[‘id’] = get_settings( $value[‘id’] ); } }
    ?>
    <meta http-equiv=”Content-Type” content=”<?php bloginfo(‘html_type’); ?>; charset=<?php bloginfo(‘charset’); ?>” />

    <link rel=”stylesheet” href=”<?php bloginfo(‘stylesheet_url’); ?>” type=”text/css” media=”screen” />
    <link rel=”alternate” type=”application/rss+xml” title=”<?php bloginfo(‘name’); ?> RSS Feed” href=”<?php bloginfo(‘rss2_url’); ?>” />
    <link rel=”pingback” href=”<?php bloginfo(‘pingback_url’); ?>” />

    <!– for translations –>
    <?php if (strtoupper(get_locale()) == ‘HE_IL’ || strtoupper(get_locale()) == ‘FA_IR’) : ?>
    <link rel=”stylesheet” href=”<?php bloginfo(‘stylesheet_directory’); ?>/rtl.css” type=”text/css” media=”screen” />
    <?php endif; ?>

    <title><?php if (is_home()) {
    echo bloginfo(‘name’);
    } elseif (is_category()) {
    echo __(‘Category » ‘, ‘blank’); wp_title(‘« @ ‘, TRUE, ‘right’);
    echo bloginfo(‘name’);
    } elseif (is_tag()) {
    echo __(‘Tag » ‘, ‘blank’); wp_title(‘« @ ‘, TRUE, ‘right’);
    echo bloginfo(‘name’);
    } elseif (is_search()) {
    echo __(‘Search results » ‘, ‘blank’);
    echo the_search_query();
    echo ‘« @ ‘;
    echo bloginfo(‘name’);
    } elseif (is_404()) {
    echo ‘404 ‘; wp_title(‘ @ ‘, TRUE, ‘right’);
    echo bloginfo(‘name’);
    } else {
    echo wp_title(‘ @ ‘, TRUE, ‘right’);
    echo bloginfo(‘name’);
    } ?></title>

    <!–
    <title><?php bloginfo(‘name’); ?> <?php if ( is_single() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?></title> –>

    <?php include(TEMPLATEPATH.”/custom.php”); ?>

    <?php wp_head(); ?>

    Where should I look to change the background image?

    In case future searchers find this page, as I did, not by looking for ways to change the header as described above but for ways to add my own image to the list offered under Theme Options as “Background”.

    This list is in \wp-content\themes\gear\functions.php. In functions.php, look for an array that starts at about line 51, listing the options offered by the “Background” pulldown such as “Two gears (yellow)” and “Shiny”. Each of these items also specifies the address of the image it uses. Add your own line to the array, naming your own background and specifying where the image is that it should use.

    Put the image where you say it should be.

    Upload the image and functions.php.
    Login to your Admin account for the blog; under “Appearance” open “Theme Options”; in the “Background:” pulldown select the item you just added; click “Save Changes”.
    Visit your blog as a user and see your new background image.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘how to put my own background image in Gear theme?’ is closed to new replies.