出于某种原因,我在使用非常简单的页脚时遇到了麻烦。在尝试在页脚中加载 Instagram 图标时,在编辑自定义 WordPress 主题时,一切似乎都正常,图像链接正确,但会中断。可能的原因是什么?
这是我尝试过的,我希望工作得很好(使用 svg.png...:
?>
<footer id="colophon" class="site-footer">
<div class="site-info">
<div class="footer-copyright">
© Mother tongues collective 2023. All rights reserved.
</div>
<div class="footer-socials">
<a href="https://www.instagram.com/mother.tongues_/" target="_blank">
<!-- #instagram icon -->
<img src="<?php bloginfo('template-url'); ?>/assets/instagram-icon.png">
</a>
</div>
</div><!-- .site-info -->
<?php wp_footer(); ?>
</footer><!-- #colophon -->
</body>
</html>
template-url
是 bloginfo()
的无效参数 – 您可能指的是 template_url
或 template_directory
:
<img src="<?php bloginfo('template_url'); ?>/assets/instagram-icon.png">