如何在wordpress中更改值stylesheet_url? [英] How to change value stylesheet_url in wordpress?

查看:283
本文介绍了如何在wordpress中更改值stylesheet_url?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在wordpress中修改一个主题,我偶然发现的是这个主题包括一个样式表文件。 < link rel =stylesheettype =text / cssmedia =allhref =<?php bloginfo('stylesheet_url');?& /> 

我发现stylesheet_url是指根文件夹中名为style.css的文件。如何更改stylesheet_url的值,以便加载css /目录中的样式表文件而不是默认样式文件?

解决方案

您可以这样放置新的css文件路径:

 < link rel =stylesheettype = cssmedia =allhref =<?php bloginfo('template_directory');?> /css/newstyle.css/> 

,如果不需要,可以删除默认的css路径。
希望这有助于你。所有最好的;)


I'm trying to modify a theme in wordpress and one thing I've stumbled upon is the way this theme is including a stylesheet file.

<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />

As I discovered stylesheet_url refers to the file named style.css in the root folder. How can I change the value of the stylesheet_url so that my stylesheet file in the css/ directory will be loaded instead of the default one?

解决方案

you can put new css file path like this:

<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo('template_directory'); ?>/css/newstyle.css" />  

and you can remove default css path if you don't need. hope this helps you. All the best ;)

这篇关于如何在wordpress中更改值stylesheet_url?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆