Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter 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>

    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>

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

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

    Thread Starter 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>

    Thread Starter Crispian

    (@crispian)

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

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

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

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

    Thread Starter Crispian

    (@crispian)

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

    Thread Starter Crispian

    (@crispian)

    Okay thanks Esmi

    Thread Starter Crispian

    (@crispian)

    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.