• Resolved ajaskey

    (@ajaskey)


    I use the_excerpt() to create the description of individual posts.

    <?php if (is_single()) {
    echo (‘ <meta name=”description” content=”‘);
    the_excerpt();
    echo (‘ “>’);
    }
    elseif (is_page())

    Each description is enclosed in <p>…</p>. I want to remove this. Is there a function to send the output of the_excerpt through to remove html tags?

    Example of output:

    <meta name=”description” content=”<p>The Square of 90 is about to complete off the March low with price up over 40%.</p>

    Thanks.
    Andy

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Removing <p> from the_excerpt’ is closed to new replies.