Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End [Solved] WordPress images not showing

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #27500
    kb2tfa
    Member

    Hey guys,

    I’m using wordpress as a backend, and I’m having some issues with images.

    In my theme folder, I have an images folder for my photos.

    What works:
    If I create a div an assign it a background-image via css, it works.

    Code:
    css for a div
    background-image: url(images/picture.jpg);

    What doesnt’ work:
    just a plain img tag placed on a page.

    Code:
    this doesn’t work, only alt text shows
    picture

    Is there something that is a part of wordpress stopping this?

    #69144
    Luminated
    Member

    To a WP installation, that path is null. You need to point it to the theme folder…easiest way to do this is use the PHP function that will always cause WP to start at the root of your template directory:

    Code:

    In your case:

    Code:
    #69166
    kb2tfa
    Member

    Thank you very much Luminated

    That worked like a charm

    Code:
    Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Back End’ is closed to new topics and replies.