• Resolved PeetCze

    (@peetcze)


    Hello,

    Iam very stupid in PHP using So I need help from community.

    I need to show some image or text to user which is based on browser version.

    For example download instructions for Chrome, IE, Mozzila etc.

    What I dont know is, where I can write PHP code in my backend (using Visual Composer) to recognize browser in Post (page)

    Thanks a lot!

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mindshare Labs, Inc.

    (@mindshare)

    Technically you cannot do this from the Visual Editor (unless you use another plugin like https://wordpress.org/plugins/allow-php-in-posts-and-pages/).

    Thread Starter PeetCze

    (@peetcze)

    Thanks. I will try it. Have you answer for second part of my question also?

    Thread Starter PeetCze

    (@peetcze)

    I used this with [php] [/php] at post and not working 🙁

    <?php
    if(is_firefox()) {
    $firefox = ‘<div class=”firefox”>
    Hi User your Browser is Firefox ‘.get_browser_version().'</strong</div>’;
    echo $firefox;
    }
    ?>

    <?php
    if(is_chrome()) {
    $chrome = ‘<div class=”chrome”>
    Hi User your Browser is Chrome ‘.get_browser_version().'</strong</div>’;
    echo $chrome;
    }
    ?>

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Where use PHP for show an image’ is closed to new replies.