# asp/assets/load

```php
apply_filters('asp/assets/load', $load);
```

### Parameters

* **$load** *(bool)* - when true, the CSS and JS files are loaded

### Examples

```php
// Stops loading Ajax Search Pro assets everywhere except the archives
add_filter( 'asp/assets/load', function ( $load ) {
    if ( is_archive() ) {
        return true;
    }
    return false;
}, 10, 1 );

// Stops loading Ajax Search Pro assets everywhere except singular pages
add_filter( 'asp/assets/load', function ( $load ) {
    if ( is_singular() ) {
        return true;
    }
    return false;
}, 10, 1 );

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://knowledgebase.ajaxsearchpro.com/hooks/filters/css-and-js/asp_load_css_js.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
