WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to add logo before site title (7 posts)

  1. zpervez
    Member
    Posted 1 year ago #

    Hello Sir,
    this is a link of my logo that i want to use in the below mentioned header of my website, can anybody help me out that how i can place this logo image before the site title of http://www.pakchristian.com and below is the logo image link
    http://www.pakchristian.com/wp-content/uploads/2013/04/pak-christian-community-1.jpg
    and this is a header.php full file. please help me.. thanks

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]

    <!DOCTYPE html>
    
    <html <?php language_attributes(); ?>>
    
    <head>
    
    <meta charset="<?php bloginfo( 'charset' ); ?>" />
    
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    
    	<title><?php wp_title(); ?></title>
    
        <?php if(of_get_option('gamepress_favicon_radio') == 1) : ?>
    
    	<link rel="shortcut icon" href="<?php echo of_get_option('gamepress_favicon_url'); ?>" type="image/x-icon" />
    
    	<?php endif; ?>
    
    	<link rel="profile" href="http://gmpg.org/xfn/11" />
    
    	<!-- End Stylesheets -->
    
    	<!--[if lt IE 8]>
    
    	<link rel="stylesheet" href="css/style_ie.css" type="text/css" media="all"  />
    
    	<![endif]-->
    
    	<?php wp_head(); ?>
    
    </head>
    
    <body <?php body_class(); ?>>
    
    <!-- PAGE -->
    
    <div id="page">
    
    	<!-- HEADER -->
    
    	<header id="header">
    
            <div id="header-inner">
    
    		<div id="logo">
    
    			<?php if (of_get_option('gamepress_logo_image')) : ?>
    
    		  <h1><a>"><img src="<?php echo of_get_option('gamepress_logo_image'); ?>" alt="<?php bloginfo( 'name' ); ?>" /></a></h1>
    
    			<?php else : ?>
    <h1 id="site-title"><a>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?> - <?php bloginfo('description'); ?>" rel="home"><?php bloginfo('name'); ?></a></h1><p><?php bloginfo('description'); ?></p>
    
    			<?php endif; ?>		
    
    		</div>
    
    <div align="left"><FONT 
    
    color="#ffffff" size="+1"><MARQUEE scrollamount="1" direction="left" loop="20" width="100%">Unless the Lord builds the house, the builders labor in vain. Unless the Lord watches over the city, the guards stand watch in vain. </MARQUEE></FONT></DIV>
    
            <?php if(of_get_option('gamepress_header_ad')) : ?>
    
            <div class="header-ad-section">
    
    			<?php echo of_get_option('gamepress_header_ad'); ?>
    
    		</div>
    
            <?php endif; ?>
    
    		<div class="clear"></div>
    
    		<nav<?php if (!of_get_option('gamepress_search')) : ?> class="nosearch"<?php endif; ?>>
    
    			<?php
    
    			if(has_nav_menu('primary-menu')){
    
    				 wp_nav_menu(array(
    
    					'theme_location' => 'primary-menu',
    
    					'container' => '',
    
    					'menu_id' => 'primary-nav',
    
    					'container_class' => 'main-menu',
    
    					'menu_class' => 'nav'
    
    				 ));
    
    			}else {
    
    			?>
    
    				<ul class="nav" id="primary-nav">
    
    					<?php wp_list_pages('title_li='); ?>
    
    			<?php
    
    			}
    
    			?>
    
                <?php if (of_get_option('gamepress_search')) : ?>
    
    			<div id="search">
    
    				<?php get_search_form(); ?>
    
    			</div>
    
                <?php endif; ?>
    
    		</nav>
    
    		</div>
    
    		<!-- END HEADER-INNER -->
    
    	</header>
    
    	<div id="content-wrapper">
    
    	<div id="content-inner">
  2. Triptripper
    TutsKid Ninja
    Posted 1 year ago #

    Add this into the logo div, just after <?php else : ?> and before <h1 id="site-title">

    <img class="altlogo" src="http://www.pakchristian.com/wp-content/uploads/2013/04/pak-christian-community-1.jpg" alt="" />

    Then add this in your theme's css

    .altlogo {
    	float: left;
    	margin: 5px 10px 10px 0;
    }
    
    header #logo p{
    	margin-top: 10px;
    }
  3. zpervez
    Member
    Posted 1 year ago #

    Respected Triptripper,
    i am very grateful for your quick and perfect cum accurate reply as my purpose is fully served and i am highly obliged for your act of kindness. Stay blessed and always be happy...
    again thanks.

  4. zpervez
    Member
    Posted 1 year ago #

    topic completed.

  5. Andrew
    Forum Moderator
    Posted 1 year ago #

    @Triptipper, please don't recommend people to edit theme files.

    @zpervez, If you don't want your changes to erase when the theme updates, make them within a Child Theme environment.

  6. zpervez
    Member
    Posted 1 year ago #

    so dear Andrew Nevins
    WordPress Newbie do u have some other option to do the same thing instead of editing the theme files..?????

  7. Andrew
    Forum Moderator
    Posted 1 year ago #

    Please see the above link, "Child Theme environment".

Topic Closed

This topic has been closed to new replies.

About this Topic