WordPress.org

Ready to get started?Download WordPress

Forums

adding image in the header.php (3 posts)

  1. paul.contreras
    Member
    Posted 1 year ago #

    I am trying to add an image in the header.php. I have uploaded a .png file to wp-content/themes/gamepress/images.

    I know where to edit the header.php to get it where I want but i just need the code to be able to insert the image.
    I want to set it on the left of the ad banner that i have and the code i currently have is:
    <p align=center style="margin-top: 15px; margin-right: 75px;"><img src="./images/logo1.png" width="170" height="90" title="Logo" margin-right: 10px; />< ad banner script></p>

    however the image never shows up.. Did i upload it to the wrong location? is there something more i need for the img src code. Thank you in advance.

  2. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    try to use:

    img src="<?php echo get_stylesheet_directory_uri(); ?>/images/logo1.png"

    http://codex.wordpress.org/Function_Reference/get_stylesheet_directory_uri

  3. PatoMaGiK
    Member
    Posted 1 year ago #

    Let's say I am going to advertize for a site with a logo for that site in my header. The logo is downloaded in my libary. Where in header.php do I make changes and how? Yes, I am new to this.

Topic Closed

This topic has been closed to new replies.

About this Topic