Support » Fixing WordPress » Image Links not showing up

  • Resolved


    I initially built my entire website in HTML, and added the CSS. Everything worked fine, albeit some browser tweaks I’ll make at the end (as it’s the hardest part).

    Once I started dividing my content into the .php files however, things started to get odd. Everything shows up as it should, except image links in HTML. Background images in my CSS file show up fine, which is strange since all of the images are in the same folder I’m linking to.

    I’m just starting to poke my nose in PHP, and as I learn the PHP WordPress tags (it’s quite fun!), things get easier, but this is an issue that’s baffling me.

    As a note, I am running my current apache server under MAMP for testing (my website is at my localhost), so I’m not quite sure if that would be the problem or not. Again, the original HTML file displays everything fine – without any changes to the image paths, image links are not showing up in my php files.

    Any suggestion as to what the problem would be? I tried searching for the solution myself, but came up flat.

Viewing 3 replies - 1 through 3 (of 3 total)


    Sorry to bump. This issue was solved by using

    <?php bloginfo('template_directory') ?>/path_to_image_folder/image.extension

    If there’s an easier way please let me know.

    Hey I encountered this problem. It can be easily resolved by linking from your wp-content folder like so…

    <img src="wp-content/themes/themename/images/1.jpg" alt="#" />

    Hope it helps.

    I am having the same trouble, and neither method above seems to be working. Things are fine on my Home page, but other pages are not displaying images that use the anchor tag.

    The images have been inserted into header.php and sidebar.php using either the php code ?php bloginfo('template_directory') ?>/path_to_image_folder/image.extension or the path <img src="wp-content/themes/themename/images/1.jpg" alt="#" /> , but no luck either way.

    Also testing locally. Images set as backgrounds for divs in CSS work fine, too.


    Help appreciated….. thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Image Links not showing up’ is closed to new replies.