Forums

[resolved] Raw / stripped tag_description? (3 posts)

  1. LoveAndMoreLove
    Member
    Posted 1 year ago #

    Hi all!

    I have a small bit of php code in my header that displays different meta descriptions on different pages. The relevant part is like this:

    elseif(is_tag()) { echo tag_description(); }

    The problem is that tag_description outputs <p>Some description here</p> instead of Some description here. And I don't like how that looks.

    Is there anyway I can output the raw text without the <p></p>?

    Thanks!

  2. alchymyth
    The Sweeper
    Posted 1 year ago #

    try:

    elseif(is_tag()) { echo strip_tags(tag_description()); }

  3. LoveAndMoreLove
    Member
    Posted 1 year ago #

    Works like a charm, thank you so much! :D

Topic Closed

This topic has been closed to new replies.

About this Topic