WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Images within wordpress theme files (4 posts)

  1. benjancewicz
    Member
    Posted 4 years ago #

    What is the best way to place images into things like header.php?
    Should that be all done with CSS? Or should I place the images right in there?

    Here's my template HTML file.
    Here's my site.

    I'm a novice theme editor, and I'm using an existing theme as a base.

    Thanks!

  2. benjancewicz
    Member
    Posted 4 years ago #

    Think I got it. Image paths should look like this, right?

    <img src="<?php bloginfo('template_directory'); ?>/images/imagename.png" alt="" width="xxx" height="xxx" />

    Right?

  3. Mark / t31os
    Moderator
    Posted 4 years ago #

    If it's in your theme folder and in the images directory of the theme, then yes that's right.

  4. benjancewicz
    Member
    Posted 4 years ago #

    Thank you very much!

Topic Closed

This topic has been closed to new replies.

About this Topic