Skip to content

Instantly share code, notes, and snippets.

@vsnilov
Created April 16, 2019 16:05
Show Gist options
  • Select an option

  • Save vsnilov/834b33dd75b4944c7296bfd18ac40639 to your computer and use it in GitHub Desktop.

Select an option

Save vsnilov/834b33dd75b4944c7296bfd18ac40639 to your computer and use it in GitHub Desktop.

Revisions

  1. vsnilov created this gist Apr 16, 2019.
    17 changes: 17 additions & 0 deletions wordpress strong and br
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    бд

    UPDATE `yod_posts` SET `post_content` = REPLACE(`post_content`, '<strong>', '')
    UPDATE `yod_posts` SET `post_content` = REPLACE(`post_content`, '</strong>', '')

    functions.php

    /*убираем br*/
    remove_filter( 'the_content', 'wpautop' );

    /*автозамена жирный текст*/
    function replace_text($text) {
    $text = str_replace('<strong>', '', $text);
    $text = str_replace('</strong>', '', $text);
    return $text;
    }
    add_filter('the_content', 'replace_text');