WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Logo in header

[Resolved] Logo in header

Viewing 10 replies - 1 through 10 (of 10 total)
  • Sorry wrong code. Here is the correct line of code…

    <div id=”logo”><?php echo ‘<img src=”wp-content/themes/adlibitumensemble_/images/logo.png” width=”400″ height=”159″ />’; ?></div>

    esmi

    @esmi

    Forum Moderator

    Always use full (absolute) urls in WordPress.

    <div id="logo"><img src="http://example.com/wp-content/themes/adlibitumensemble_/images/logo.png" width="400" height="159" /></div>

    Or even better (in a template file):

    <div id="logo"><img src="<?php echo get_stylesheet_directory_uri();?>/images/logo.png" width="400" height="159" /></div>

    Moderator Andrew Nevins

    @anevins

    Forum moderator

    Are you missing the forward slash at the start of your image source url?

    @ Esmi Theme Diva & Forum Moderator

    I am currently building this website on localhost at the moment before I upload it online. it could be the reason why I cant see the logo. Thanks. I will keep in mind to use full urls.

    Will try your solution.

    @ Andrew

    You mean (Check bolded text) in the code

    <div id=”logo”><?php echo ‘<img src=”/wp-content/themes/adlibitumensemble_/images/logo.png” width=”400″ height=”159″ />’; ?></div>

    You mean the forward slash just after the <img src=”/

    Moderator Andrew Nevins

    @anevins

    Forum moderator

    Yes, that is what I mean. You may get a better long-term result with Esmi’s recommended code, “Or even better”.

    esmi

    @esmi

    Forum Moderator

    @ Esmi Theme Diva & Forum Moderator

    Gosh – the full title! 😉

    Please try one or other of the suggestions I made above. Using relative urls anywhere within WordPress will always produce unpredictable results.

    Okay. Thanks Andrew. Will try this and see what goes

    Okay thanks Esmi

    Hi Esmi. It worked. Thanks for your help 🙂

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Resolved] Logo in header’ is closed to new replies.