Support » Themes and Templates » How do I add images to posts?

  • Hello
    How do I add images to posts and have them show up in the archive of said post?
    I currently just have it linked to my images folder but it is not there on the comments and other generated pages?

Viewing 11 replies - 1 through 11 (of 11 total)
  • You are probably using a relative url “img src=”/images/bunny.jpg”
    You need to use a full url “img src=””

    Thanks alot, It worked like a charm!

    Cool !!


    Actually, you don’t have to use full URI.
    Relative URI works great, given that you specify in the header of the index.php file the following line :
    <base href=””/>
    By the way, “url” does not exist yet, but “uri” does.

    Hey thanks for the advice, that will be used in the future I am sure.

    Strictly speaking, ‘url’ would be better described as extinct.

    I”ve placed the code within the index.php as follows:

    /* Don"t remove this line. */
    <base href=""/>
    <!DOCTYPE html PUBLIC "-//W3C//......

    Is this right?

    No. should be the link to your domain.

    Also, it should be below the DOCTYPE or your page won’t validate.

    Okay, so just below DOCTYPE and as written. Or would it have to be something like:

    <base href=""/>

    if WordPress is installed in its own directory?

    We need to put this in the codex or wiki as people use photos all the time. Is it there? Or is this fixed in 1.5?

    It’s all relative, literally.

    If your WP install is in wordpress/ and you do the base as above, then you can specify wp-content/image.jpg and have it work as it should. If you don’t hang the wordpress/ on there, then you’ll have to find your images as wordpress/wp-content/image.jpg

    Oh, and my mistake above, the base tag should be in the head section. Validation would point that out.

    I have 1.2.2 running and it’s easy to paste this into the index.php. But I also have 1.5 running and the index.php now works differently. Should it be in the index.php or the wp-blog-header.php?

    I assume the header because that is where the HEAD tag resides, but I want to make sure.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘How do I add images to posts?’ is closed to new replies.