Title: Plugin breaks is_front_page() function, alternative?
Last modified: August 22, 2016

---

# Plugin breaks is_front_page() function, alternative?

 *  Resolved [Nela](https://wordpress.org/support/users/nelchee/)
 * (@nelchee)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/plugin-breaks-is_front_page-function-alternative/)
 * Hey,
    first of all thank you for the plugin, I was really frustrated with not
   being able to set events page as my homepage, and your plugin saved me! 🙂
 * However now I have a problem of not being able to target the homepage because
   is_front_page() returns false even when I’m on the home page.
    I did some googling,
   and apparently messing with the queries causes it.
 * Can you recommend another way of determining if I’m on the homepage that doesn’t
   rely on this function?
    Thanks!
 * [https://wordpress.org/plugins/event-rocket/](https://wordpress.org/plugins/event-rocket/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Barry](https://wordpress.org/support/users/barryhughes-1/)
 * (@barryhughes-1)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/plugin-breaks-is_front_page-function-alternative/#post-5242797)
 * Yes, it does indeed monkey around with the query (in order to “trick” The Events
   Calendar). What if you add something like this to your theme’s functions.php 
   file:
 *     ```
       function is_eventrocket_frontpage() {
       	global $wp_query;
       	$eventrocket_frontpage = $wp_query->get( 'eventrocket_frontpage' );
       	return ( true === $eventrocket_frontpage );
       }
       ```
   
 * You could then test to see if it is the frontpage using:
 * `if ( is_eventrocket_frontpage() ) { /* Do something... */ }`
 * Would that work?
 *  Thread Starter [Nela](https://wordpress.org/support/users/nelchee/)
 * (@nelchee)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/plugin-breaks-is_front_page-function-alternative/#post-5242803)
 * Thank you very much Barry, it works! 🙂
 *  Plugin Author [Barry](https://wordpress.org/support/users/barryhughes-1/)
 * (@barryhughes-1)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/plugin-breaks-is_front_page-function-alternative/#post-5242820)
 * Excellent!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Plugin breaks is_front_page() function, alternative?’ is closed to new
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/event-rocket_dacd8c.svg)
 * [Event Rocket](https://wordpress.org/plugins/event-rocket/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/event-rocket/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/event-rocket/)
 * [Active Topics](https://wordpress.org/support/plugin/event-rocket/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/event-rocket/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/event-rocket/reviews/)

## Tags

 * [homepage](https://wordpress.org/support/topic-tag/homepage/)

 * 3 replies
 * 2 participants
 * Last reply from: [Barry](https://wordpress.org/support/users/barryhughes-1/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/plugin-breaks-is_front_page-function-alternative/#post-5242820)
 * Status: resolved