WEB trying to make a wordpress theme

Discussion in 'OT Technology' started by BoostedBoogie, Oct 17, 2008.

  1. BoostedBoogie

    BoostedBoogie New Member

    Joined:
    Oct 31, 2003
    Messages:
    2,979
    Likes Received:
    0
    Location:
    [email protected] d13g0
    i'll have various divs in there all with individual <img src> tags, but they don't work for some reason. but if i make the div background image the same source through the css, it works. i have no idea why this is going on, any help?
     
  2. White Stormy

    White Stormy Take that, subspace!

    Joined:
    Sep 17, 2002
    Messages:
    85,729
    Likes Received:
    196
    Location:
    Sparkopolis
  3. pkr

    pkr Guest

    check your referring image location

    make sure if it's in the css stylesheet you call it with a "/" so /images/blah.gif

    if it's inline on the html it should just be "images/blah.gif"
     
  4. RG

    RG New Member

    Joined:
    May 4, 2003
    Messages:
    28,233
    Likes Received:
    0
    Location:
    Connecticut
    provided the images folder is in the same location as the html file
     
  5. kingtoad

    kingtoad Well-Known Member

    Joined:
    Sep 2, 2003
    Messages:
    56,163
    Likes Received:
    232
    Location:
    Los Angeles
    The problem is that you are not specifying the correct path to your images folder. It works with CSS because the CSS file is in your theme folder. Keep in mind that your WordPress theme is not in the root directory of your server. You need to specify your template path then call the image accordingly.

    Code:
    <img src="<?php bloginfo('template_directory'); ?>/images/image.jpg" alt="image" />
    
     
  6. BoostedBoogie

    BoostedBoogie New Member

    Joined:
    Oct 31, 2003
    Messages:
    2,979
    Likes Received:
    0
    Location:
    [email protected] d13g0
    i'll give that a try guys, thanks. had a feeling it had something to do with the paths.
     
  7. BoostedBoogie

    BoostedBoogie New Member

    Joined:
    Oct 31, 2003
    Messages:
    2,979
    Likes Received:
    0
    Location:
    [email protected] d13g0
    works perfectly, thanks guys! guess i should've read more documentation on wordpress' custom functions -__-
     

Share This Page