J
J
jecer2018-07-24 22:57:48
WordPress
jecer, 2018-07-24 22:57:48

How to replace quotes in wordpress?

Greetings!
I ran into a problem that instead of straight quotes (""), there are Christmas trees ("") on the whole site
, I googled it, found a way to replace it (so as not to shovel the entire site):

add_filter( 'the_content' , 'my_wptexturize' );
function my_wptexturize( $content ) {
$symbol_table = array('«' => '"', '»' => '"', '«' => '"', '»' => '"', '«' => '"', '»' => '"', '«' => '"', '»' => '&#34');
$content = strtr( $content, $symbol_table );
return $content;
}

after that, quotes were replaced somewhere, but somewhere not
, what's the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Orkhan Hasanli, 2018-07-24
@jecer

Hello!
Try using Better Search Replace to replace the quotes. Select all database tables. Don't forget to create a database dump (updraft plus backup).
Well, or through phpmyadmin, download the database, change the characters through search & replace (sublime ctrl + h) and fill in the database back (I don’t really recommend it, because sometimes it can break the database due to serialized data). Better plugin

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question