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.
бд
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');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment