Support » Fixing WordPress » How to add logo before site title

  • Resolved zpervez


    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 and below is the logo image link
    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(); ?>>
    <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="" />
    	<!-- End Stylesheets -->
    	<!--[if lt IE 8]>
    	<link rel="stylesheet" href="css/style_ie.css" type="text/css" media="all"  />
    	<?php wp_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 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'); ?>
            <?php endif; ?>
    		<div class="clear"></div>
    		<nav<?php if (!of_get_option('gamepress_search')) : ?> class="nosearch"<?php endif; ?>>
    					'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 if (of_get_option('gamepress_search')) : ?>
    			<div id="search">
    				<?php get_search_form(); ?>
                <?php endif; ?>
    		<!-- END HEADER-INNER -->
    	<div id="content-wrapper">
    	<div id="content-inner">
Viewing 6 replies - 1 through 6 (of 6 total)
  • Add this into the logo div, just after <?php else : ?> and before <h1 id="site-title">

    <img class="altlogo" src="" alt="" />

    Then add this in your theme’s css

    .altlogo {
    	float: left;
    	margin: 5px 10px 10px 0;
    header #logo p{
    	margin-top: 10px;

    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.

    topic completed.

    Moderator Andrew Nevins


    Forum moderator

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

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

    Moderator Andrew Nevins


    Forum moderator

    Please see the above link, “Child Theme environment”.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to add logo before site title’ is closed to new replies.