Support » Fixing WordPress » Remove html tags from content

  • Resolved ashishbajaj

    (@ashishbajaj)


    Hi i am trying to remove html formating from the content.

    am using the following code

    <?php
    
    $string1 = the_content();
    $string = strip_tags($string1);
    
    echo $string ;
    
    ?>

    how ever this is not working for me.

    when i echo the content it shows up as <p> text text </p>

    i want to remove the <p> </p> tags from the content.

    How can i do this.. please advise.

    Thanks in Advance. !!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove html tags from content’ is closed to new replies.