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.


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

    This image is totally useless for us

    We need the link to your site…


    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="" alt="" />


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