The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Stuck trying to insert an image into a custom homepage template (5 posts)

  1. rereradu
    Posted 6 years ago #

    I just cannot figure out what is wrong with this... I am trying to insert an image into the homepage template that I created, but it just doesn't show up. I am running WP on localhost and I have placed the picture in the theme's image folder (atahualpa). Any idea? Thx.

  2. rereradu
    Posted 6 years ago #

    so when I am trying this " <img src="./images/picture.png" width="40" height="65" alt=""> " it doesn't show anything. If anyone has at least one suggestion I could follow...

  3. Scoe
    Posted 6 years ago #

    I have the same problem.

    The reason for this is because the link ./images/picture.png doesnt actually exist (e.g. http://www.domain.com/images/picture.png will not find anything.), this is because the theme folders are all created through functions in the main wordpress code.

    my attempt (which did not work) was to include the uri into the source of the file with php, It ended up having lots of unknown symbols :S

    If anyone else has an idea on how to solve this, please let us know :)


  4. Scoe
    Posted 6 years ago #

    found a sollution:

    <img src="<?php bloginfo('template_url'); ?>/images/picture.png" />

    that one was bugging me :)

  5. mirroreflex
    Posted 6 years ago #

    try using this html tag for picture:
    <img src="<?php bloginfo('stylesheet_directory'); ?>/images/yourimage.gif" width="xxx" height="xxx" title="title for picture" alt="alt for picture" />

Topic Closed

This topic has been closed to new replies.

About this Topic