WordPress.org

Ready to get started?Download WordPress

Forums

Add Banner to Header (10 posts)

  1. sportwiz628
    Member
    Posted 4 years ago #

    Hello how do I add a banner to my header/top of my site. The link is and I want to change the text that says Mets Paradise to a banner. How do I do it?

  2. sportwiz628
    Member
    Posted 4 years ago #

    The link is metsparadise.com

  3. Erick Hitter
    Member
    Posted 4 years ago #

    In your theme's header.php file, locate the following code:

    <h1><a href="<?php bloginfo('url'); ?>/"><?php bloginfo('name'); ?></a></h1>

    You should replace the <?php bloginfo('name'); ?> portion of this line with the <img> code for your banner.

  4. sportwiz628
    Member
    Posted 4 years ago #

    I can not find anywhere in the header.php file that full code you said I even CTRL + F

    Please tell me another way, also how do I find the code for the banner?

  5. sportwiz628
    Member
    Posted 4 years ago #

    Any help?

  6. alchymyth
    Forum Moderator
    Posted 4 years ago #

    in header.php - line 37 - find:

    <div class="search">

    directly before that line insert something like:

    <div id="headbanner" style="height:100px; width:420px; border:1px solid green; position:relative; top:30px; left:575px;"><img src="http://www.whateverweb.com/imagepath/imagename.png" alt="alternative text" /></div>

    play with the numbers and the code within the new div, depending on the size of your banner and if it should be clickable. you probably need to move the position of the search button and/or change the height of the header.

    if you have problems, please come back with more details and let us know what you have tried so far ;-)

  7. sportwiz628
    Member
    Posted 4 years ago #

    It worked but the banner was all the way to the right for some reason. All I did was put in the code that you said and changed the url with the url of my banner.

  8. sportwiz628
    Member
    Posted 4 years ago #

    Alright I got it just had to edit some things, how can I make it clickable though? So that when you click it it'll go back to the main page?

  9. alchymyth
    Forum Moderator
    Posted 4 years ago #

    change the img bit

    <img src="http://www.whateverweb.com/imagepath/imagename.png" alt="alternative text" />

    into

    <a href="<?php bloginfo('url'); ?>"><img src="http://www.whateverweb.com/imagepath/imagename.png" alt="" /></a>
  10. sportwiz628
    Member
    Posted 4 years ago #

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.