Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1009739

    Hi,

    Just wondering if there is a code snippet to add to the CSS or php files that will allow me to change the browser address bar colour when viewed in mobile view?

    Thanks
    John

    #1009741

    Ok.. figured it out I think.
    I’ve generated this code and placed it in the functions.php. Seems to work well.. at least on my Android device.

    <?php
    function address_mobile_address_bar() {
    $color = “#008509″;
    //this is for Chrome, Firefox OS, Opera and Vivaldi
    echo ‘<meta name=”theme-color” content=”‘.$color.'”>’;
    //Windows Phone **
    echo ‘<meta name=”msapplication-navbutton-color” content=”‘.$color.'”>’;
    // iOS Safari
    echo ‘<meta name=”apple-mobile-web-app-capable” content=”yes”>’;
    echo ‘<meta name=”apple-mobile-web-app-status-bar-style” content=”black-translucent”>’;
    }
    add_action( ‘wp_head’, ‘address_mobile_address_bar’ );

    #1009808

    Hi,
    Thanks for sharing your solution, unless there is anything else we can help with on this issue, shall we close this then?

    Best regards,
    Mike

    #1009960

    Hi Mike,

    Yes please close. all good and thank you for the reply.

    Cheers
    John

    #1010053

    Hi John,

    Thanks for letting us know. I’ll close this for now then, please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Change colour of mobile address bar’ is closed to new replies.