Load specific css y javascript

In sage I can load specific javascript files. WordPress allows to load css by template implemented the function is_page_template (). I have a virtual page, which is not a type of content.
How can I load css and javascript with sage in a virtual page created with the filter generate_rewrite_rules?

Thanks for the help

Hey @helgi - see if instead of checking for the page template you can check for whatever query vars, etc., your rewrite rule is working off of.

Greetings @mmirus. I did it in the following way in the file setup.php:

global $wp_query;

if (isset($wp_query->query_vars['rents'])) {

Thanks for the suggestion

1 Like

This topic was automatically closed after 42 days. New replies are no longer allowed.