WordPress.org

Ready to get started?Download WordPress

Forums

What plugins use the IMG shortcode? (2 posts)

  1. studio500
    Member
    Posted 1 year ago #

    Hi Everyone
    At some point I have deleted a plugin that has left many of my images displaying in between a shortcode.

    i.e [IMG]/wp-content/uploads/etc.jpg[/IMG]

    Does anyone have any knowledge of an image plugin /plugins that use IMG shortcodes to display images?

  2. studio500
    Member
    Posted 1 year ago #

    I did try to add this shortcode to my functions php file but it returned an error. I think I probably put it in the wrong place as I am not familiar with script.

    function img_shortcode($atts, $content=null){
    return <img src="' . $content . '" />';
    }
    add_shortcode('img', 'img_shortcode');

    I'm not sure how to add a basic validation to ensure that there is text in between the IMG shortcode boxes.
    Can anyone assist me with this please?

    Many thanks (From a frustrated WPresser who has taken 4 days to identify this problem :0( )

Topic Closed

This topic has been closed to new replies.

About this Topic