Linking words to sites
-
Hello,
I am trying to use php to allow for a link from specific word to a specific site every time that word appears.
This is what I have tried:
function wpToLink($content){
$content = str_ireplace(“doctor”,’Doctor‘, $content);
return $content;
}
add_filter(‘the_content’,’wpToLink’);It worked for my professor but not for me. The word is highlighted but the cursor will not allow me to click on it to be sent to the site.
Please help,
Thank you
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Linking words to sites’ is closed to new replies.