Support » Fixing WordPress » is_home() not working

  • Dan


    Hello guys,

    I made a plugin for banner administration, you know advertising. I want to run that plugin only if I am visiting the main page, I mean the home page.

    I tried in my plugin file (its just one file) to use is_home() function, but it always returns FALSE. Do you guys have any ideas about why this happens? I mean, I’ve been reading lots of post in the net about this function and it seems not working as it should. I tried all the suggestions given in this forum and in the Google results, but I am always still getting FALSE with is_home() even if I am in the main page.

    Note: I have no home.php file. Thanks!

Viewing 1 replies (of 1 total)
  • vkaryl


    I’m not sure you can put the if is_home() function in the plugin itself. (Of course, I can quite certainly be wrong about that….)

    What I normally do is put the if is_home() function just before the plugin call.

Viewing 1 replies (of 1 total)
  • The topic ‘is_home() not working’ is closed to new replies.