📌  相关文章
📜  wordpress enqueue 样式子主题 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:36.181000             🧑  作者: Mango

代码示例1
// To enqueue the WordPress way your CSS sources
// INSIDE your theme/child functions.php:

function wp_starter_scripts() {
    wp_enqueue_style( 'wp-style-menu', get_template_directory_uri() . '/style-menu.css' );
    wp_enqueue_style( 'wp-style-buttons', get_template_directory_uri() . '/style-buttons.css' );
    wp_enqueue_style( 'wp-style-footer', get_template_directory_uri() . '/style-footer.css' );
  }
add_action( 'wp_enqueue_scripts', 'wp_starter_scripts' );