• Resolved Mamikei

    (@mamikei)


    I created a custom homepage. It’s nothing complex… The only thing in the #mainContent section is an image. The alt tag shows but not the image (I realize this is not suppose to happen). The image is located in the images folder (images/home_image.jpg). The home.css is located in the css folder (css/home.css).

    Here is what is in the home.php:

    <?php get_header(); ?>
    
    <div id="mainContent">
    	<img src="images/home_image.jpg" alt="XXXXXXXX" width="845" height="700" />
    </div><!-- END mainContent-->
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>

    Here is what is in the home.css file:

    #mainContent {
    	float: right;
    	width: 850px;
    	min-height: 517px;
    }

    Unfortunately I cannot post a link to the site, as I am testing locally. Any assistance would be greatly appreciated. Cheers!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Use full (absolute) image urls – not relative ones.

    Thread Starter Mamikei

    (@mamikei)

    Thanks, that worked! This is the code… keep in mind I am testing locally:

    <?php get_header(); ?>
    
    <div id="mainContent">
    	<img src="/wp-content/themes/XXXXXXXXX/images/home_image.jpg" alt="XXXXXXXXX width="845" height="700" />
    </div><!-- END mainContent-->
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Image not showing on custom homepage’ is closed to new replies.