我怎樣才能擺脫爲http://此:條HTTP:從the_author_url //()
<a href="<?php the_author_url(); ?>"><?php the_author_url()); ?></a>
我已經試過這樣:
<a href="<?php the_author_url(); ?>">
<?php $url = the_author_url();
$url = substr($url,0,6);
echo $url; ?>
</a>
但無效果...
如何嘗試'str_replace()'? 'str_replace(「http://」,「」,the_author_url());' – Albzi 2014-10-17 11:26:40
請注意,該函數已被棄用。您應該使用['the_author_meta('user_url')'](http://codex.wordpress.org/Function_Reference/the_author_url)。 – 2014-10-17 11:33:40