标题PHP图标链接

标题PHP图标链接,php,html,Php,Html,为什么这不是我添加到PHP头文件的链接 <a href="https://keepmovingcare.com/cart/"> <img class="basketicon" id="topL" src="<?php echo get_stylesheet_directory_uri(); ?>/images/bag.png"/></a> <?php endif; ?> <a href="https://keepmovingcar

为什么这不是我添加到PHP头文件的链接

<a href="https://keepmovingcare.com/cart/">
<img class="basketicon" id="topL" src="<?php echo get_stylesheet_directory_uri(); ?>/images/bag.png"/></a>
<?php endif; ?>
<a href="https://keepmovingcare.com/cart/"><span class="basket-number">
<?php
global $woocommerce;
echo $woocommerce->cart->cart_contents_count;
?>
</span></a>

它过去是这样的:

<?php endif; ?>

<?php
if ( ! $et_top_info_defined && ( ! $et_slide_header || is_customize_preview() ) ) {
et_show_cart_total( array(
'no_text' => true,
) );
}
?>

虽然我按照一些指南在主导航中显示购物车,而不是在辅助导航中显示购物车,但它没有链接,如果破坏了站点,则删除php端,但这会影响链接吗

它呈现此图标:

我可以在inspect中看到链接,但它们不可单击:


if语句的起点在哪里?能否显示它在浏览器中呈现的内容?@MichaelRennison补充道it@Tushar已经添加了前面的代码,如果有帮助,那么如果您在浏览器中检查元素,您可以在src标记中看到什么?