• the wp tinymce editor stripes the html tags for security reasons, I was thinking to a text replacement script, I`m not really good in php, but I tryed this:

    <?php echo str_replace("mytr","<tr>", the_content();); ?>

    but it`s not working, any idea?
    it is in the loop.

Viewing 1 replies (of 1 total)
  • the_content() function echoes the content. You should use get_the_content() instead.

    <?php
      $content = get_the_content();
      echo str_replace( "mytr", "<tr>", $content );
    ?>
Viewing 1 replies (of 1 total)
  • The topic ‘replace text in content with php’ is closed to new replies.