Support » Themes and Templates » i cant use <img> tags in a theme???

  • Im new to wordpress themes, Im trying to design a theme but it seems that the themes dont allow you to use <img> tags (for example, using an img tag for the logo)… it appears like a broken link.

    Is there something wrong in my code or simply something i dont know about wordpress themes?

Viewing 4 replies - 1 through 4 (of 4 total)
  • You can definitely use <img> tag in a template file, along with any html tag.

    The path to your images is probably wrong. You have to point your theme folder.

    If you could give us an url or any example of what you’re trying to do, we will give you a solution.

    S.

    Thread Starter danoob32

    (@danoob32)

    I pointed the images to the theme folder but take a look to what happens

    http://www.flickr.com/photos/26042217@N06/3470568647/

    This image is totally useless for us

    We need the link to your site…

    S.

    Ok… I managed to zoom the image to see your code.

    If your images directory is in the theme folder, you must use something like:

    <img src="<?php bloginfo('template_directory'); ?>/images/yourimage.jpg" alt="" />

    <?php bloginfo('template_directory'); ?> generate the complete path to your theme directory… If your image are in a sub folder in your theme, then you add it :

    <?php bloginfo('template_directory'); ?>/images/

    On the html side, it will output :

    <img src="http://www.yourdomain.com/wp-content/themes/yourtheme/images/yourimage.jpg" alt="" />

    S.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘i cant use <img> tags in a theme???’ is closed to new replies.