Php 我的自定义样式表排队函数赢得';行不通

Php 我的自定义样式表排队函数赢得';行不通,php,html,css,wordpress,Php,Html,Css,Wordpress,我一直在关注一个在线教程,该教程教我如何使用functions文件夹而不是Header将Wordpress的样式表排队使用以下代码: function lucieaverillphotography_scripts() { wp_enqueue_style( 'lucieaverillphotography_style', get_stylesheet_uri() ); } 其次是: add_action( 'wp_enqueue_scripts', 'lucieaverillphotogr

我一直在关注一个在线教程,该教程教我如何使用functions文件夹而不是Header将Wordpress的样式表排队使用以下代码:

function lucieaverillphotography_scripts() {

wp_enqueue_style( 'lucieaverillphotography_style', get_stylesheet_uri() ); }
其次是:

add_action( 'wp_enqueue_scripts', 'lucieaverillphotography_scripts' );
这已经起作用了,但是当我尝试为页面模板将单独的样式表排队时,它不会起作用。这是我使用的代码,我把它放在上面两个代码之间:

if (is_page_template('page-templates/full-page.php')) {
wp_enqueue_style( 'lucieaverillphotography-full-page' ,
get_template_directory_uri() . '/css/full-page.css');
} 

else { wp_enqueue_style( 'lucieaverillphotography_style', 
get_template_directory_uri() . '/style.css'); }
我觉得这与最后一部分有关:“/style.css”。。。但我能让我的主题识别新样式表的唯一方法是在其位置添加:“/css/full page.css”,然后它对每个页面使用新样式表,而不是页面模板


如果我通过添加包含style.css的文件夹的名称(即“/files/style.css”)来更改它,我将丢失所有css,这令人费解,因为我认为这是最明显的尝试。

在functions.php中尝试这一点

function lucieaverillphotography_scripts() {

    if (is_page_template('page-templates/full-page.php')) {
        wp_enqueue_style( 'lucieaverillphotography-full-page' , get_template_directory_uri() . '/css/full-page.css');
    }
    else{
        wp_enqueue_style( 'lucieaverillphotography_style', get_stylesheet_uri() );
    }

}
add_action( 'wp_enqueue_scripts', 'lucieaverillphotography_scripts' );