Logo Change php

Discussion in 'PHP' started by UltimateOnline, Mar 2, 2008.

  1. #1
    Dear All

    I am trying to change my logo on my Blog.

    I hav no idea how to do this i have been told to go to templates which i have and go into header.php.

    I have done this but i am not very good at php. My logo name is Image2.gif and i uploaded it to my images folder.

    Can anyone help with how to add my logo?

    My header php code is

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    <meta name="distribution" content="global" />
    <meta name="robots" content="follow, all" />
    <meta name="language" content="en, sv" />
    
    <title><?php wp_title(''); ?><?php if(wp_title('', false)) { echo ' :'; } ?> <?php bloginfo('name'); ?></title>
    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />
    <!-- leave this for stats please -->
    
    <link rel="Shortcut Icon" href="<?php echo get_settings('home'); ?>/wp-content/themes/modernpaper/images/favicon.ico" type="image/x-icon" />
    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
    <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    <?php wp_get_archives('type=monthly&format=link'); ?>
    <?php wp_head(); ?>
    <style type="text/css" media="screen">
    <!-- @import url( <?php bloginfo('stylesheet_url'); ?> ); -->
    </style>
    </head>
    
    
    <body>
    
    <div id="header">
    
    	<div class="headerleft">
    		<a href="<?php echo get_settings('home'); ?>/"><?php bloginfo('name'); ?></a>
    	</div>
    	
    	<div class="headerright" onclick="location.href='<?php bloginfo('rss2_url'); ?>';" style="cursor: pointer;">
    	</div>
    	
    </div>
    
    <div id="navbar">
    
    	<div class="navbarleft">
    		<?php bloginfo('description'); ?>
    	</div>
    	
    	<div class="navbarright">
    		<ul>
    			<?php wp_list_pages('title_li=&depth=1'); ?>
    		</ul>
    	</div>
    	
    </div>
    Code (markup):
     
    UltimateOnline, Mar 2, 2008 IP
  2. swishman

    swishman Well-Known Member

    Messages:
    1,264
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    140
    #2
    no need to edit the header file..
    just use your ftp and replace the logo with your new one..
    make the name as same as the old one..replcae it..ur done..
     
    swishman, Mar 2, 2008 IP
  3. UltimateOnline

    UltimateOnline Guest

    Messages:
    321
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I have tried that on my blog www.prisonservice.info it has it as prisonservice.inf as the name this is all done in the admin of wordpress i want to change that to an image logo.

    If you understand :confused:
     
    UltimateOnline, Mar 2, 2008 IP
  4. stoli

    stoli Peon

    Messages:
    69
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You should just be able to replace:
    <?php bloginfo('name'); ?>
    on line 31 (in the div class=headerleft) with an image tag like:
    <img src="/images/mylogo.gif" />

    So your header php code would look like:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    <meta name="distribution" content="global" />
    <meta name="robots" content="follow, all" />
    <meta name="language" content="en, sv" />
    
    <title><?php wp_title(''); ?><?php if(wp_title('', false)) { echo ' :'; } ?> <?php bloginfo('name'); ?></title>
    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />
    <!-- leave this for stats please -->
    
    <link rel="Shortcut Icon" href="<?php echo get_settings('home'); ?>/wp-content/themes/modernpaper/images/favicon.ico" type="image/x-icon" />
    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
    <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    <?php wp_get_archives('type=monthly&format=link'); ?>
    <?php wp_head(); ?>
    <style type="text/css" media="screen">
    <!-- @import url( <?php bloginfo('stylesheet_url'); ?> ); -->
    </style>
    </head>
    
    
    <body>
    
    <div id="header">
    
    	<div class="headerleft">
    		<a href="<?php echo get_settings('home'); ?>/"><img src="/images/mylogo.gif" /></a>
    	</div>
    	
    	<div class="headerright" onclick="location.href='<?php bloginfo('rss2_url'); ?>';" style="cursor: pointer;">
    	</div>
    	
    </div>
    
    <div id="navbar">
    
    	<div class="navbarleft">
    		<?php bloginfo('description'); ?>
    	</div>
    	
    	<div class="navbarright">
    		<ul>
    			<?php wp_list_pages('title_li=&depth=1'); ?>
    		</ul>
    	</div>
    	
    </div>
    
    Code (markup):
    Obviously change the src attribute in the img element to point at the location of your logo.
     
    stoli, Mar 2, 2008 IP