• Hi, I want to use conditional tags in order for my plugin to know what type of page is being displayed. is_home() and is_page() dont seem to work.

    Does anyone know how I can activate them?

    Thanks in advance

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter geoneo

    (@geoneo)

    Just found an example that uses,

    global $wp_query;
    if ( $wp_query->is_home ) {
    // do something
    }

    But this doesnt seem to work, any ideas?

    Thread Starter geoneo

    (@geoneo)

    btw im using 2.7. Ive just found some other posts from people saying it doesnt work in 2.7.

    Is there a new command I should be using?

    What exactly are you trying to do? Perhaps the is_front_page() function could be of help?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘use is_home() within plugin code’ is closed to new replies.