[wp-hackers] wp_enque_script and conditional tags
scribu
scribu at gmail.com
Sun Jul 20 10:54:42 GMT 2008
@Austin Matzko: No, i didn't misspell it, because it works without is_home().
@Andy: I have tried it on a fresh install, with a single active plugin
that had this code:
add_action('init', 'js_loader');
function js_loader(){
if ( is_category() )
wp_enqueue_script('jquery');
}
If I remove the if condition, it works fine.
On Sun, Jul 20, 2008 at 5:58 AM, Andy Skelton <skeltoac at gmail.com> wrote:
>> if ( is_home() )
>
> That will be false if you are testing it on a static front page. Test
> is_front_page() if you are using a static front page.
>
> Andy
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
--
http://scribu.net
More information about the wp-hackers
mailing list