Tag Info

New answers tagged

1

Before starting answer I have to say that regarding this topic css and js are not the same. Reason is simple: while adding js to the body of the page (in footer) is a common and valid way to act, css need to be in the <head> section of the page: even if majority of browsers can proper render css in page boy, it is not valid HTML code. When a ...


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' );



Top 50 recent answers are included