• Resolved lup0z

    (@lup0z)


    Hi,
    I’m creating my custom theme based on twentytwelve standard theme.
    I’ve just modified the style.css file and works fine on browsers but testing it on mobile devices like ipad or iphone, it seems like the css file isn’t loaded.

    Here’s the link to test it: home

    And this is the current style.css file: style.css

    How can I make it working?

    Thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • This in the <head> is pointing to localhost

    <link media="all" type="text/css" href="http://localhost/pvr/wp-content/themes/pvr/style.css?ver=3.5.1" id="twentytwelve-style-css" rel="stylesheet">

    Check if that’s hardcoded directly in header.php, or dynamically added via function as it was supposed to, and fix it.

    Thread Starter lup0z

    (@lup0z)

    Thank you for your reply.
    In the header.php file, the stylesheets are loaded by <?php wp_head(); ?>
    so it’s dynamically added.
    The error came from my upload of the whole website from local to web because I mainly work on localhost with XAMPP.

    How can I see how the wp_head() takes the CSS files to fix it?

    Anyway, another question came to me: if the style.CSS file is loaded dynamically and the URL is wrong, how can I see the styling even in browsers?
    It sounds odd.

    Open your functions.php and look for how it adds style to head.

    Here is the correct way.
    http://themes.trac.wordpress.org/browser/twentytwelve/1.2/functions.php#L149

    Notice the use of get_stylesheet_uri() in this line

    wp_enqueue_style( 'twentytwelve-style', get_stylesheet_uri() );

    and the URL is wrong, how can I see the styling even in browsers?

    Probably it’s a cached version, did you try to clear browser cache?

    Thread Starter lup0z

    (@lup0z)

    Paulwpxp, thank you so much for your suggestion.
    I didn’t use it but it allows me to research and find out that editing the wp_option table on the DB, I can edit the website URL and it works fine!

    Thank you so much!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Custom theme based on Twentytwelve doesn't work on mobile devices’ is closed to new replies.