images in theme files won't show (4 posts)

  1. achenn
    Posted 4 years ago #

    I'm trying to build a theme with a few hardcoded images- background, social share buttons, and logo.

    Live site.

    Here are examples of the code I'm using:

    <div id="stay-in-touch">
    	<p>Stay in touch-</p>
    		<li><a href="#"><img src="img/facebook.png" alt="Like on Facebook" /></a></li>
    		<li><a href="#"><img src="img/twitter.png" alt="Follow on Twitter" /></a></li>
    		<li><a href="#"><img src="img/linkedin.png" alt="Connect on LinkedIn" /></a></li>
    </div><!-- end stay-in-touch -->


    body {
    	background: url('img/background.png');
    	-webkit-background-size: cover;
    	-moz-background-size: cover;
    	-o-background-size: cover;
    	background-size: cover;
    	font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;

    I thought maybe it was something to do with the host and permissions, but everything seems fine on that end. Any and all help is greatly appreciated.

  2. Chip Bennett
    Theme Review Admin
    Posted 4 years ago #

    In the template files, change this:


    ...to this:

    src="<?php echo get_template_directory_uri(); ?>/img/facebook.png"

    For the CSS URLs, your site is generating 403 permission denied errors:

    You'll need to figure out why. Could be file/directory permissions; could be something in .htaccess.

  3. achenn
    Posted 4 years ago #

    Ah, Chip you've saved the day once again. Thank you!

  4. achenn
    Posted 4 years ago #

    PS- The issue with the CSS URL was in the host's file permission settings. Bluehost is tricky.

Topic Closed

This topic has been closed to new replies.

About this Topic