Tag Info

Hot answers tagged

2

You should wrap your enqueue/register function in your conditional, not your add_action() You can try something like this using the is_404() conditional check function enqueue_404_script() { if(is_404()) { //do what you need to do } } add_action( 'wp_enqueue_scripts', 'enqueue_404_script' );



Only top voted, non community-wiki answers of a minimum length are eligible