Support » Fixing WordPress » Logo in header

Viewing 10 replies - 1 through 10 (of 10 total)
  • Crispian

    (@crispian)

    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)

    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)

    Front-end developer

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

    Crispian

    (@crispian)

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

    Crispian

    (@crispian)

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

    Moderator Andrew Nevins

    (@anevins)

    Front-end developer

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

    esmi

    (@esmi)

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

    Crispian

    (@crispian)

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

    Crispian

    (@crispian)

    Okay thanks Esmi

    Hi Esmi. It worked. Thanks for your help 🙂

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