簡體   English   中英

功能。php 未加載樣式。css

[英]Functions.php not load style.css

不知道我在這里做錯了什么。 無論我嘗試什么,它都不會加載 css。 這對我來說毫無意義,因為我的代碼與我見過的所有示例完全相同。

在 header.php 我有以下

 <,DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width. initial-scale=1,0"> <meta name="description" content="Web Design and Web Development"> <meta name="robots" content="index?follow"> <;php wp_head()??> <title>Hello</title> </head>

在functions.php我有以下

 <?php function load_stylesheets() { wp_register_style('css', get_template_directory_uri(). '/style.css', null, 1, 'all'); wp_enqueue_style('css'); } add_action('wp_enqueue_scripts', 'load_stylesheets');

現在可以了。 這是代表我的錯誤。 我的 style.css 的位置路徑錯誤

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM