That’s not valid PHP code…. you want something like this:
<?php if(is_mobile()) : ?>
<div class="mobileoverlay">
<div class="fullwidth">
<div class="mobilecontainer">
mobile content
</div>
<!-- /.mobilecontainer -->
</div>
<!-- /.fullwidth -->
</div><!-- /.mobileoverlay -->
<?php endif; ?>
Oh sorry! From the examples given, for a PHP ignoramus like me it seemed <?php if(is_mobile()) { your code }; ?> was the verbatim syntax, so I took it as my code was supposed to go where it says “your code”. Perhaps the below example would be even clearer for nitwits like me, might save you future grief?
<?php if(is_mobile()) : ?>
your code
<?php endif; ?>
Thanks again so much for getting back to me, you’re a star. The world would be a better place if only PHP pros used WordPress plugins but alas not! 😉
Now I’m getting:
Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 19922944 bytes) in wp-2015/wp-content/plugins/php-browser-detection/cache/cache.php on line 65540
http://constantartists.com/wp-2015/jobs
Yeah that’s an issue with this plugin. It doesn’t play well with most cheap shared hosting packages. You only have 40mb for PHP, this plugin really requires at least 128mb to work well. The problem is that their are so many browsers and devices (over 10,000) in the array that it takes a lot of memory to parse and store.
If you can upgrade your hosting to 128mb or better still 256mb it should work, but I can’t promise anything.
Thanks, will talk to the host.
“Normal” who can say?
If you want a plugin to do what this one does, it takes more memory.