PHP Browser Detection
[resolved] How do display alternate content if Chrome and OS X? (2 posts)

  1. Ryan
    Posted 1 year ago #

    I have javascript on my homepage that does not run on Chrome in OS X and I'm looking to display alternate content. At the moment I have this code which displays alternate content if it's Chrome on any OS, but the issue only happens on Chrome for OS X. Any ideas how to accomplish this?

    <?php if(is_chrome()) : ?>
    Alternate Content.
    <?php else : ?>
    Normal Content.
    <?php endif; ?>


  2. Mindshare Studios, Inc.
    Plugin Author

    Posted 1 year ago #

    You'd need to use the php_browser_info() function to check the platform variable in order to test for OSX. Check out the tests.php file on your site and look for the [platform] entry.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic