wordpress , plugins : hi , I want to create website by wordpress but I want to make speacial plugins .. and I made it but there are problem .. _
I have a website and I using it with wiki for contries in the world ..
I want from the plugins 'when the visitor open the page for example 'United State' , I want from the plugins to search about all of world in this page like cities ' New York , .... ' and replace it by like for city's page for example = New York ..
I don't know how make it ..
I tried few times but I fail >_< ..
<?php
/*
Plugin Name: ReplaceMent
*/
$wiki_contry = array ("Japan"=>"<a href='?japan.php'> Japan <a/>","United State"=>"<a href='?usa.php'> United State <a/>");
function replace($text){
foreach ($wiki_contry as $ky => $vl){
$text = str_replace(ِ"$ky","$vl", $text);
return $text;
}
}
add_filter('the_content','replace');
?>
other world , I want my site like wikipidia but using wordpress and plugins ^_^..
thank you very much