WooCommerce – Conditional for page created by rewrite_rule
In WordPress, the request path, e.g. path/to/something as in example.com/path/to/something?query=string&if=any, is saved in WP::$request which is accessible via the global $wp variable, so in your case, you can do so to check if the page is /dashboard/products: global $wp; // Note: No trailing slashes. $is_my_page = ( ‘dashboard/products’ === $wp->request ); // Or without the … Read more