Forums

[closed] Removing <p></p> tags from excerpt (3 posts)

  1. AtypicalChuck
    Member
    Posted 5 years ago #

    I am trying to use the excerpt so that I can type in a link to an image (I.E. http://www.imagesite.com/image.jpg) without quotes and have that url be inserted into my main page using the following code:

    <img src="<?php the_excerpt(); ?>">

    However, the excerpt has these tags on both sides of the url automatically and the code ends up looking like this (imagine the [p][/p] tags are the normal html ones... this post ate them when I first posted):

    <img src="[p]http://www.atypicalweb.com/mt-icons/siteicon.jpg[/p]

    ">

    Can someone tell me what I am doing wrong and how to fix it? :)

  2. AtypicalChuck
    Member
    Posted 5 years ago #

    For some reason my post cut out the p tags I placed in, here is the code product with [p] [/p] used for the normal ones:

    <img src="[p]http://www.atypicalweb.com/mt-icons/siteicon.jpg[/p]
    ">

  3. whooami
    Member
    Posted 5 years ago #

    dupe=http://wordpress.org/support/topic/87516?replies=3

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags