• Resolved travisbouck

    (@travisbouck)


    Hi. New to WP. Have a quick question. Creating a childtheme from twenty twelve theme and want to have a link from the logo. Performing all work on localhost.

    I have created a folder under the child theme with the name “images”. The image within is named “s2gglobe.png”.

    In the header.php file in the child theme I have adjusted the header to try and include the logo in the header file:

    <div class="childheader">
    		<div class="childlogo">
    			<a href="/"><img src="images/s2gglobe.png"></a>
    		</div>
    		<nav id="site-navigation" class="main-navigation" role="navigation">.......

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    Don’t think the css should affect it but I am floating it – including the child css here also:

    .childlogo {
    float: left;
    padding: 10px;
    }

    I am guessing that I am making a pretty easy error but I can’t seem to find out why the logo won’t appear – get a little box that I am expecting shows up when it can’t find your image. Anyone have any ideas?

    Thansk.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Never use relative urls in WordPress. They rarely work in a predictable fashion. Try:

    <a href="/"><img src="<?php echo get_stylesheet_directory_uri();?>/images/s2gglobe.png"></a>

    instead.

    Thread Starter travisbouck

    (@travisbouck)

    Ok thanks. I have changed that and it worked well. Cheers.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘images within child theme on localhost not showing’ is closed to new replies.