?" />
T
T
Tanya2018-05-04 15:09:42
CMS
Tanya, 2018-05-04 15:09:42

How to replace strong and b tags throughout the site with ?

Can you please tell me how to replace the < strong > < / strong > and < b > </b > tags with < span class="strong" > </span > on the product and category pages of the site (on wordpress)?
Thank you very much in advance!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Arman, 2018-05-04
@Arik

1. Resave the database
2. You can use .htaccess or the php-fpm config to set up the connection of scripts to any request, first everything in ob_start (), at the end we check that the text/html header was sent and if so, the response is given after preg_replace where it replaces the tags on the fly

S
Sergey, 2018-05-04
@baskserg

In phpmyadmin sql query not?
And so with each replacement tag

I
Ilya Beloborodov, 2018-05-04
@kowap

very rude but somehow

update from `news` set `content` = REPLACE(`content`, '<strong>', '<span class="strong">')
update from `news` set `content` = REPLACE(`content`, '</strong>', '</span>')
update from `news` set `content` = REPLACE(`content`, '<b>', '<span class="strong">')
update from `news` set `content` = REPLACE(`content`, '</b>', '</span>')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question