function replace_text_wps($text){ $replace = array( 'Theme King' => '<a href="https://yijile.com/tag/wordpress/" rel="tag" >Theme King</a>', 'WordPresstheme' => '<a href="https://wpfans.org/theme" rel="category tag" >WordPresstheme</a>', 'WrodPresscourse' => '<a href="https://wpfans.org/wplearn" rel="nofollow" target="_blank" >WrodPresscourse</a>' ); $text = str_replace(array_keys($replace), $replace, $text); return $text; } add_filter('the_content', 'replace_text_wps');
usage method
Paste the following code into your own WordPress theme functions.php File.