WordPress.org

Support

Support » Themes and Templates » How can you change the header to add a logo

How can you change the header to add a logo

Viewing 10 replies - 1 through 10 (of 10 total)
  • Taste In London
    Member

    @taste-in-london

    I am having the same issue.

    Could somebody please assist me on this?
    I understand that if I go to appearance>asteria options> basic I could change it, but I only want to add the logo, I don’t want to change the rest of the heather.

    Thanks!

    despina.mina
    Participant

    @despinamina

    the same!
    thanks

    missmikado
    Participant

    @missmikado

    same problem!

    you simply could do this by adding image url in file head4.php
    e.g.:

    <div class="logo">
    			<?php if ( is_home() ) { ?>
                <h1><a href="<?php echo esc_url( home_url( '/' ) );?>"><img src="YourLogo.jpg" alt="logo"></a></h1>
                <?php }else{ ?>
                <h2><a href="<?php echo esc_url( home_url( '/' ) );?>"><?php bloginfo('name'); ?></a></h2>
                <?php } ?>
        </div>
    	<!--LOGO END-->

    missmikado
    Participant

    @missmikado

    thanks!

    replace <?php bloginfo(‘name’); ?> with your logo/image url in <h2> as well to work in all pages. Should be something like this:

    <h1><a href="<?php echo esc_url( home_url( '/' ) );?>"><img src="YourLogo.jpg" alt="logo"></a></h1>
    <?php }else{ ?>
    <h2><a href="<?php echo esc_url( home_url( '/' ) );?>"><img src="YourLogo.jpg" alt="logo"></a></h2>
    <?php } ?>

    This helps me a lot!

    CrouchingBruin
    Participant

    @crouchingbruin

    Just as a word of caution, do not edit the theme’s files directly by going to Appearance > Editor. If there is an update to the theme (which sounds like will be coming soon), you will lose your changes. Yes, you can go back & make your changes again … if you remember what you did the first time. And then you’ll have to make the changes again the next time the theme is updated. Instead, the generally accepted practice is to create a child theme and make your changes to a copy of the file you want to modify.

    missmikado
    Participant

    @missmikado

    Right. But i think the feature of a picture-logo should be embed in the free theme. That is standard in all other themes i know…

    Menno1987
    Member

    @menno1987

    Cheers st.idnacius! Got it working aswell :”D … Would be lovely just to be able to upload it directly from the theme options though.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘How can you change the header to add a logo’ is closed to new replies.