最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

functions - CSS style and app.js not loading

programmeradmin3浏览0评论

I'm brand new at theme development. My directory is the following:

I should see, in the page source (even if I have a blank page) the app.js loaded, but I don't. This is what I see:

what is wrong in the function.php:

<?php
function load_stylesheets()
{

        wp_register_style('stylesheet', get_template_directory_uri() . '/style.css','',1,'all');
        wp_enqueue_style('stylesheet');

        wp_register_style('custom', get_template_directory_uri() . '/app.css',''1,'all');
        wp_enqueue_style('custom');
}
add_action('wp_enqueue_scripts', 'load_stylesheets');

function load_javascript()
{

        wp_register_script('custom', get_template_directory_uri() . '/app.js', 'jquery',1,true);
        wp_enqueue_script('custom');

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

thank you in advance.

发布评论

评论列表(0)

  1. 暂无评论