PHP Browser Detection
[resolved] Usage question (2 posts)

  1. SimplyMarkB
    Posted 2 years ago #

    Hi everybody,

    I have a question.. in my wordpress header.php,

    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" />

    I want to use this plugin to create custom stylesheets based on browser.

    Any suggestions on usage? I tried
    <?php if(is_firefox($version)) {
    <link rel="stylesheet" type="text/css" href="mystyle.css">
    }; ?>

    Can I do calls like this? Will this plugin work in header.php?? Not sure that I am doing wrong.. suggestions??



  2. Mindshare Labs, Inc.
    Plugin Author

    Posted 2 years ago #

    Your PHP syntax is wrong. You would need to do something like this:

    <?php if(is_firefox()) : ?>
    <link rel="stylesheet" type="text/css" href="mystyle.css">
    <?php endif; ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • PHP Browser Detection
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic