i have the next function
<?php
$hide = array('<a href="http://web.imobtour.ro/rent-a-car/" title="Rent-A-Car">Rent-A-Car</a>');
$replace_with = '<a href="http://rac.imobtour.ro" title="Rent-A-Car" target="_blank">Rent-A-Car</a>';
function censor($context) {
global $hide, $replace_with;
foreach ($hide as $words) {
$context = eregi_replace($words, $replace_with, $context);
}
return $context;
}
?>
i want to replace a link from the navigation - pages
and i use
<?php censor(wp_list_pages('depth=1&title_li=' )); ?>
so i don't create a manually button.
is there a script in wordpress codex that cand do this ? so i don't have edit the theme code?
what is bad in my "script" ( is not made by me :P )
i get this:
Warning: Invalid argument supplied for foreach() in /home/btour/public_html/web/wp-content/themes/default/header.php on line 36