WordPress.org

Ready to get started?Download WordPress

Forums

Inserting Images in Posts - Bug? (7 posts)

  1. functionjunkie
    Member
    Posted 9 years ago #

    Hi All,

    I am trying to add an image to a post, and I don't know if I am losing my mind here, but something strange is going on.

    If I add


    <img src="<?php bloginfo('template_url'); ?>/images/external.gif" alt="External Link" title="External Link" />

    to my post, it changes it to


    <img src="<?php bloginfo('template_url'); ?/>/images/external.gif" alt="External Link" title="External Link" />

    by adding a slash after the closing ? for the php tag.

    Bug?

  2. Jinsan
    Member
    Posted 9 years ago #

    it's not a bug but meant to do that so that php code cannot be used within a post - it's a security thing.

    you can install runphp or wp-exec to run php within a post

  3. functionjunkie
    Member
    Posted 9 years ago #

    Ah... good to know. I'm going to use the full path to the image. Thanks Jinsan.

    Where can I get these 2 apps or plugins if need be?

    - Justin

  4. Or place the image in a different location, like a separate "images" folder in the WordPress root.

  5. Jinsan
    Member
    Posted 9 years ago #

    you can also try:

    http://priyadi.net/archives/2005/03/02/wordpress-php-exec-plugin/

    which may very well be the same thing since Mac beat me to it :D

  6. functionjunkie
    Member
    Posted 9 years ago #

    Great... Thanks guys! Much appreciated.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.