Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/41.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在Wordpress中调用php文件上的css?_Php_Css_Wordpress - Fatal编程技术网

如何在Wordpress中调用php文件上的css?

如何在Wordpress中调用php文件上的css?,php,css,wordpress,Php,Css,Wordpress,可能重复: 我打算在wordpress插件上添加一个按钮 我想在按钮上添加一个样式,我知道将css调用到html文件的基本方法,如 <link rel="stylesheet" type="text/css" href="buttonPro.css"> 但是它不能处理php文件您可以这样称呼它: <link rel="stylesheet" href="<?php bloginfo('template_url'); ?> /css/style.css" me

可能重复:

我打算在wordpress插件上添加一个按钮

我想在按钮上添加一个样式,我知道将css调用到html文件的基本方法,如

<link rel="stylesheet" type="text/css" href="buttonPro.css">


但是它不能处理php文件

您可以这样称呼它:

<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>
/css/style.css" media="screen" />

显示您的代码。另外,请检查这一点,典型的PHP文件只输出HTML,这样就可以了。(在所有其他条件相同的情况下,通常采用级联规则,并且必须使用正确的URL)
<?php 
   put some php code here
?>

   **put some HTML code here**

<?php
   now you can continue with php
?>