Title: Mobile Menu function disregarded when cached
Last modified: October 25, 2016

---

# Mobile Menu function disregarded when cached

 *  [saxonycreative](https://wordpress.org/support/users/saxonycreative/)
 * (@saxonycreative)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/mobile-menu-function-disregarded-when-cached/)
 * Hi, I have a custom function in my theme to switch the menu from the standard
   menu to a mobile menu (changing which menu is loaded with a variable wp_is_mobile()
   statement). When the cache is clear, this function works, but after the cache
   builds up, the mobile version of the website ignores the mobile menu and loads
   the default full menu instead. I have put the file containing this function in
   the list of excludes, but it doesn’t seem to make a difference. Do you know how
   I would resolve this? Thanks!
 * Aaron

Viewing 1 replies (of 1 total)

 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/mobile-menu-function-disregarded-when-cached/#post-8355099)
 * When the cache is created, PHP does not work. You shouldn’t check it via theme
   file. You should do it via plugin.

Viewing 1 replies (of 1 total)

The topic ‘Mobile Menu function disregarded when cached’ is closed to new replies.

 * ![](https://ps.w.org/wp-fastest-cache/assets/icon-256x256.png?rev=2064586)
 * [WP Fastest Cache - WordPress Cache Plugin](https://wordpress.org/plugins/wp-fastest-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-fastest-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-fastest-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-fastest-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-fastest-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-fastest-cache/reviews/)

## Tags

 * [cache](https://wordpress.org/support/topic-tag/cache/)
 * [function](https://wordpress.org/support/topic-tag/function/)
 * [menu](https://wordpress.org/support/topic-tag/menu/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * 1 reply
 * 2 participants
 * Last reply from: [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * Last activity: [9 years, 7 months ago](https://wordpress.org/support/topic/mobile-menu-function-disregarded-when-cached/#post-8355099)
 * Status: not resolved