php - Replace a letter with another in an entire Wordpress page -


i'm making wordpress website danish shipping agency in based germany, , want homepage automatically transform letter "ø/Ø" letter "ö/Ö".

i have made php function/program replace ø/Ø ö/Ö, $string.

but how can make check letters in wordpress page?

<?php $string = "Öýra bibendum trisö tique agergöet dellentesque Öibendum Öristique gmet reölentesqueö."; $newsmall = "ö"; $oldsmall = "ø"; $onlyconsonants = str_replace($oldsmall, $newsmall, $string); $newlarge = "Ö"; $oldlarge = "Ø"; $onlyconsonants = str_replace($oldlarge, $newlarge, $onlyconsonants);  echo $onlyconsonants;  ?> 

there 2 ways this:

1. use plugin (probably best way):

take @ this one can work you.

it's described as:

lets find , replace text in pages, posts, custom post types , trashed items gui. optional: postmeta , low_priority updates

2. replace content on database

this query should trick:

update wp_posts set post_content = replace (   post_content,   'item replace here',   'replacement text here');   

full tutorial here

do backup before of processes.


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -