Forums

[resolved] Easy way to get images (4 posts)

  1. Keiron_Lowe
    Member
    Posted 1 year ago #

    Hi, I'm new to wordpress and I'm developing a theme for a CSS blog I'm creating, is there a simple way of inserting images into the theme?

    Right now I have to enter
    <img src="wp-content\themes\themename\images\logo.png" alt="logo" width="273" height="86" id="logo">

    Is there a way I could get the path shorter, such as <img src="images/logo.png">?

    Thankyou

  2. James
    Happiness Engineer
    Posted 1 year ago #

    Try this:

    <img src="<?php bloginfo('stylesheet_directory'); ?>/images/logo.png" alt="logo" width="273" height="86" id="logo" />

  3. Keiron_Lowe
    Member
    Posted 1 year ago #

    That has worked perfectly!
    Thankyou!

  4. James
    Happiness Engineer
    Posted 1 year ago #

    You're welcome!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags