is_home() not working in my WordPress plugin
When using is_home(), is_category(), is_page() etc. in my WordPress plugin that displays category-based ads, they kept returning NULL.
My problem was that I was calling this these function directly in my plugin. I resolved this by adding these call to my adHeaderSetup() function and setting the hook add_action(‘wp_head’, ‘adHeaderSetup’);