• Warren Harrison

    (@hungrymedia)


    I ran into a problem of being unable to override the P2 theme’s mobile stylesheet in a child theme by placing a copy of style-iphone.css in my child theme directory.

    I was able to overcome the issue by change line 529 of p2/functions.php from:
    $iphonecss = dirname( __FILE__ ) . '/style-iphone.css'; if ( is_file( $iphonecss ) ) require $iphonecss;

    to read:
    $iphonecss = get_stylesheet_directory() . '/style-iphone.css'; if ( is_file( $iphonecss ) ) require $iphonecss;

    This correctly references the current theme’s directory rather than the directory of the P2 theme.

    Might be worth adding to the theme so that users can override the mobile styles as needed.

  • The topic ‘P2 Theme – Mobile child theme support’ is closed to new replies.