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

How do I find stylesheet & javascript handles?

programmeradmin1浏览0评论
This question already has answers here: How can I get a list of all enqueued scripts and styles? (5 answers) Closed 5 years ago.

I am new to php and am just learning the basics. I'm dequeuing some stylesheets & scripts in WordPress using the following code:

function dequeue_scripts() {
    wp_dequeue_script( 'handle' );
}
add_action( 'wp_print_scripts', 'dequeue_scripts' );

My question is how do I know what the script's / stylesheet's handle name is? Where can I find it?

I appreciate any help!! :)

This question already has answers here: How can I get a list of all enqueued scripts and styles? (5 answers) Closed 5 years ago.

I am new to php and am just learning the basics. I'm dequeuing some stylesheets & scripts in WordPress using the following code:

function dequeue_scripts() {
    wp_dequeue_script( 'handle' );
}
add_action( 'wp_print_scripts', 'dequeue_scripts' );

My question is how do I know what the script's / stylesheet's handle name is? Where can I find it?

I appreciate any help!! :)

Share Improve this question asked Apr 29, 2019 at 18:53 jade newportjade newport 251 silver badge5 bronze badges 1
  • You also could just scan the whole codebase for wp_enqueue_script. – norman.lol Commented Apr 29, 2019 at 21:41
Add a comment  | 

1 Answer 1

Reset to default -1

WordPress provides a list of the scripts they enqueue in the Codex. That's a good place to start.

Take a look at this question for a more complete answer: How can I get a list of all enqueued scripts and styles?

发布评论

评论列表(0)

  1. 暂无评论