I在
theme/Xtocky/woocommerce/centent-product.php上写了代码。 输出链接,例如
<?php echo the_author_link(); ?>
.
。如何使其输出链接,例如
<a href="www.dermaroller.com">zac1987</a>
?
? 我已经在Xtocky文件夹和WooCommerce文件夹上创建了wutor.php文件,我认为
<a href="author.php">zac1987</a>
会自动创建链接到rution.php,但为什么不呢?
发现解决方案,只需将我的代码替换为
<?php echo the_author_link(); ?>
<a href="<?php echo get_author_posts_url(get_the_author_meta( 'ID' )); ?>"><?php the_author(); ?></a>
。也许任何专家将来都可以解释。
发现解决方案,只需将我的代码替换为
the_author_link();
不知道为什么不能使用update
sorry,正确的答案是用
the_author_link();
替换
the_author_link();