php 将css / js添加到wordpress

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php 将css / js添加到wordpress相关的知识,希望对你有一定的参考价值。

<?php

function university_files() {
    wp_enqueue_script('universirty-main-scripts', get_theme_file_uri('/js/scripts-bundled.js'), NULL, microtime(), true);
    wp_enqueue_style('custom-google-font', '//fonts.googleapis.com/css?family=Roboto+Condensed:300,300i,400,400i,700,700i|Roboto:100,300,400,400i,700,700i');
    wp_enqueue_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css');
    wp_enqueue_style('university-main-styles', get_stylesheet_uri(), NULL, microtime());
}
add_action('wp_enqueue_scripts', 'university_files');

以上是关于php 将css / js添加到wordpress的主要内容,如果未能解决你的问题,请参考以下文章

php 将CSS添加到Wordpress

PHP 将版本添加到WordPress主题CSS文件。

将 CSS 添加到 PHP Wordpress 插件

php 将fontawesome 5 CSS添加到WordPress的头部区域

PHP Wordpress - 将CSS文件添加到样式Visual Editor中

如何将自定义 css 和 js 文件添加到 wordpress 的管理区域 [关闭]