gpt4 book ai didi

Wordpress 使用完全限定的 http ://localhost/instead relative 解析 get_template_directory_uri()

转载 作者:行者123 更新时间:2023-12-05 07:46:14 25 4
gpt4 key购买 nike

我已经在我的 xampp 环境中安装了 wordpress。我主题中的所有 CSS 和 JS 都包含在:

wp_enqueue_style('kiga_spottberg_pure', get_template_directory_uri() . '/bower_components/pure/pure-min.css', array(), null);

现在的问题是在我的 html 源代码中每个地方都打印了完整的 uri:

<link rel='stylesheet' id='kiga_spottberg_pure_grids-css'  href='http://localhost/wordpress/wp-content/themes/kiga_spottberg/bower_components/pure/grids-min.css' type='text/css' media='all' />

但如果我通过 IP 地址访问我的本地服务器,这将不起作用。我该如何解决这个问题?

谢谢!

最佳答案

您可以在“设置”->“常规”中更改您的博客网址,或按照 instructions from the WordPress 设置动态网站网址。文档。

关于Wordpress 使用完全限定的 http ://localhost/instead relative 解析 get_template_directory_uri(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40958544/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com