WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Adding Logo in the header (31 posts)

  1. 51554456
    Member
    Posted 2 years ago #

    I am so frustrated at this point & would appreciate your help. Please do not give me links to getting started with WordPress or Codex as I have read all the resources & still do not understand how to add a logo image at top CENTER of my page instead of text. My site is Photomomentsforlife.com/wordpress & I am using the Twenty Eleven theme. I have made a Child theme with style.css & header.php files. I have the image that I want to upload in my media folder. It is called Logo1.jpg & the link to it is http://photomomentsforlife.com/wordpress/wp-content/uploads/2012/04/Logo1.jpg (I think)I have searched & tried so many different things & my brain is fried at this point! If you could tell me EXACTLY what to paste into these files it would be sooooo helpful!

  2. varunms
    Member
    Posted 2 years ago #

    hi

    open the header.php in theme folder and find

    [mod: please mark any posted code to keep it readable and un-corrupted]

    <h1 id="site-title"><span>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></span></h1>

    Replace The Above Code With Below One

    <h1 id="site-title"><span>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><<img src="pathto image" /></span></h1>

    Make Sure You Have Mensioned The Correct Image Path

  3. 51554456
    Member
    Posted 2 years ago #

    Thanks for your help. When I added this code my white space got larger & that's the only thing that happened. I have this code for h2 to hide the text.

    h2 {
    color: #000;
    font-size: 15px;
    font-weight: bold;
    margin: 0 0 .8125em; font-size: 0;
    text-indent: -1000px; }

    When I remove the " font-size: 0;
    text-indent: -1000px; } " it shows the logo but it also shows " title="Moments for Life Photography" rel="home"X. How can I hide the text & CENTER the logo image?

  4. varunms
    Member
    Posted 2 years ago #

    hi

    i have opened your site but i can't see your logo can i restore the old one so that i can check and tell u what to do

  5. 51554456
    Member
    Posted 2 years ago #

    http://photomomentsforlife.com/wordpress/ I have cleared my cache & the logo is showing on my screen. How do you restore the old one?

  6. varunms
    Member
    Posted 2 years ago #

    hi

    give me a minute

  7. varunms
    Member
    Posted 2 years ago #

    hi

    just find this code

    " title="Moments for Life Photography" rel="home"><

    the logo is correctly fetid just remove the above text and see your site

  8. 51554456
    Member
    Posted 2 years ago #

    I have searched the header.php & style.css child theme files & could not find " title="Moments for Life Photography" rel="home">< anywhere am I looking in the wrong place?

  9. varunms
    Member
    Posted 2 years ago #

    can i get your header.php file via code here so that i can assist you better

  10. 51554456
    Member
    Posted 2 years ago #

    Nm I found it! Thanks but how do I get the logo aligned in the center?

  11. esmi
    Forum Moderator
    Posted 2 years ago #

    Please use the pastebin for more than 10 lines of code.

  12. varunms
    Member
    Posted 2 years ago #

    hi

    open style.css and paste the below style code at the bottom of the file

    #site-title {
        padding: 3.65625em 0 0;
        text-align: center;
        margin:0;
    }
    h1#site-title span img {width:300px;height:100px;}
  13. 51554456
    Member
    Posted 2 years ago #

    I really appreciate your help! I tried pasting the code you suggested but nothing changed. Here is my Child theme style.css http://pastebin.com/rmBt4K13 & my header.php http://pastebin.com/yzNcg2Dn

  14. 51554456
    Member
    Posted 2 years ago #

    Sorry im so new to all of this.. style.css http://pastebin.com/iKzFFEaY & header.php http://pastebin.com/6BpUjsGf

  15. varunms
    Member
    Posted 2 years ago #

    Replace the added style with the below style.

    h1#site-title {
        padding: 3.65625em 0 0;
        text-align: center;
        margin:0;
    }
    h1#site-title span img {width:300px;height:100px;}
  16. 51554456
    Member
    Posted 2 years ago #

    Still no change :( Do I need to fill in the site-title area of the code or something?

  17. varunms
    Member
    Posted 2 years ago #

    sorry replace with code
    i am sure that this will work

    #site-title {
        padding: 3.65625em 0 0;
        text-align: center;
    }
    h1#site-title span img
    {
    width:300px;
    height:100px;
    }
  18. 51554456
    Member
    Posted 2 years ago #

    That code moved my header photo (the large photo) to the right.

  19. varunms
    Member
    Posted 2 years ago #

    can you restore and tell me so that i can check what is the issue

    restore to original css file

    delete all the editing u have don right now

  20. varunms
    Member
    Posted 2 years ago #

    Hi

    Do You Have Any other css files in your theme folder

    can you provide your full css code via pastebin.com

  21. 51554456
    Member
    Posted 2 years ago #

  22. varunms
    Member
    Posted 2 years ago #

    have you restored all the edits

  23. esmi
    Forum Moderator
    Posted 2 years ago #

    Can I ask what is wrong with your site's header at the moment? I can see your logo in the header area and no text.

  24. 51554456
    Member
    Posted 2 years ago #

    @ varunms I tried the code you gave me at the end of style.css & the first time I only had one or two lines of code(edits) so then I tried to copy the entire parent style.css file over to the child's to see if it would work.
    @ esmi I do not want text at the top instead I just want the logo to be aligned in the center.

  25. varunms
    Member
    Posted 2 years ago #

    hi

    kindly restore you style.css so that i can check what's the problem

  26. esmi
    Forum Moderator
    Posted 2 years ago #

    Wait a moment! Try adding:

    #site-title span {
    display:block;
    text-align:center;
    }
  27. 51554456
    Member
    Posted 2 years ago #

    @esmi I pasted the code you suggested at the bottom of the style.css, is this the right place for it? It made no changes.

    @varunms how do I restore my style.css?

  28. varunms
    Member
    Posted 2 years ago #

    hi

    Kindly Replace The Style.css Of The Child Theme With The Style Code In Below Link

    http://pastebin.com/K5rGNqX0

  29. 51554456
    Member
    Posted 2 years ago #

    Okay I replaced the code.

  30. varunms
    Member
    Posted 2 years ago #

    hi

    is that working ??

Topic Closed

This topic has been closed to new replies.

About this Topic