WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. SimplyMarkB
    Member
    Posted 8 months 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??

    -Mark

    http://wordpress.org/plugins/php-browser-detection/

  2. Mindshare Studios, Inc.
    Member
    Plugin Author

    Posted 5 months 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; ?>

Reply

You must log in to post.

About this Plugin

About this Topic