so in header we have two different navigations, desktop and mobile and based users device it will show correct one, never had issues before but on this website it randomly shows sometimes desktop on mobile and vice versa, for example on 10 pages it shows desktop but on one mobile and vice versa if on mobile.
Did any of you had any issues with this? I am running newest bricks. version with all codes signed and put to functions.php based on bricks instructions. I don’t want to share website globally here so please help without website if possible, but if not possible I will send it.
It’s working OK for me using 1.9.7.1 but I’m not using it to control the header menu, instead using it to control visibility of two elements, one for desktop and one for mobile.
Then I have this set as the condition to show say the element for desktop devices:
dynamic data {echo:wp_is_mobile} ==
0
So no () at the end of wp_is_mobile
What I did find when I initially set this up is that caching has a major effect. If I cleared the cache and then on desktop viewed the page with the elements in, the desktop element is correctly shown and therefore cached. This meant it was also shown on mobile devices. Vice versa if I cleared the cache and then viewed the page using a mobile device, that element got cached and was shown on desktops too. It drove me mad for a few hours until I realised it was caching and therefore set the page to be not cached.
Yes, actually had huge issues on all websites using the function recently because of caching. Do any of you know maybe some other better option if using cache because if using only CSS media queries and if you want the website to pass Google PSI it isn’t good that the same elements load on both?