• Resolved wretchederin

    (@wretchederin)


    The img tag will not work in any of my PHP(XHTML) files, but I can use CSS for images.

    Both my HTML and CSS validate Firefox’s plugin validator, which links to the WW3 site. I’ve tried single quotes, double quotes, relative links, absolute links, putting the images in an “images” folder and leaving them out of the folder in the same directory as the page. For the life of me I can’t figure out what I’m doing wrong.

    In another thread somebody mentioned hotlink protection, but I still haven’t figured out what that is.

    Here is my site, (don’t mind the content, it’s totally beta): https://71.18.58.125/wordpress/
    If you scroll to the bottom you’ll see all the mangled attempts I made at RSS logo’s, but I’ve been having the same problem with any attempt at inserting an image.
    They are real logo’s, for example here is a link to one: https://71.18.58.125/wordpress/wp-content/themes/tutorial/images/feed-icon_green.jpg

    I am building the site offline using Xampp, and can’t get it to work offline or on.

    Please help!

    *edit: the absolute URL (https://…) does work now. Though it would be better if I could use something relative for when I eventually move the site

Viewing 2 replies - 1 through 2 (of 2 total)
  • What directory did you upload the rss image files to? The code you have will only work if you uploaded them to web root – and then will only continue, if you never change the permalink structure.

    My suggestion would be to upload your rss to: ‘/wordpress/themes/’your-theme‘/images/’

    and then use the following code to link to them in footer.php:
    <img src="<?php print get_bloginfo('template_directory') . '/images/feed-icon_green.jpg'; ?>" alt="RSS" />

    Thread Starter wretchederin

    (@wretchederin)

    Ok, so you are completely awesome! Not knowing PHP very well it would have taken me eons to figure that one out. Thanks a lot! Your code is working in xampp.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘img tag won’t work in XHTML’ is closed to new replies.