Home / template / Alternate content for mac with user agent check
  • How to Alternate content for mac with user agent check

    alternate-content-for-mac-with-user-agent-check

    Using this PHP snippet within your wordpress template will allow you to display alternate content for MAC users.

    ( click code to copy )

    wordpress snippet : PHP

    <>
    <?php
    if (stristr($_SERVER['HTTP_USER_AGENT'],"mac")) {
             // display content for mac
    }else{
             // everyone else
    }
    ?>
    

    ( WordPress codex functions, hooks, in this snippet. )