how to properly enqueue styles and scripts in PHP/WordPress

后端 未结 2 1533
栀梦
栀梦 2020-12-21 21:19

I\'m new to WordPress/PHP and I\'m trying to create a theme, during a tutorial it\'s saying to use the wp_enqueue_style/script to load css/js files however for some reason I

2条回答
  •  南方客
    南方客 (楼主)
    2020-12-21 21:37

    You can do that :

        wp_enqueue_script( 'blog', get_template_directory_uri() . '/js/blog.js', array('jquery'), true );

提交回复
热议问题