Child theme functionality with Graphene Mobile

Child themes are great. They allow you to customise a parent theme without ever needing to edit the parent theme’s files. However, due to the way most mobile theme switcher plugins work, you can’t use child theme with Graphene Mobile the way you usually can with standard desktop themes. This is because the child theme won’t be loaded when the mobile theme is loaded.

However, the Graphene Mobile theme has a feature implemented in it that allows you to have child theme-like functionality. In this post, I will explain how you can use this lesser known feature.

Child themes and Graphene Mobile

Two of the most commonly used files in a child theme is the style.css and the functions.php file. The style.css file is where you place all your custom css styles, whereas the functions.php file is where you place all your custom PHP functions. Child themes also allow you to override the parent theme’s templates, but most of the time you don’t need them to. In fact, I wouldn’t even recommend it, for reasons that you can read about here.

With Graphene Mobile, you can have it load a custom style.css and functions.php files without actually creating a child theme for it. But those are all the custom files it will load. It would not load any other files unless you specifically include() or require() them in the custom functions.php file, or if you import() them in the custom style.css file. It would not also replace any of its template files with any custom template files you may create.

The How To

In order to have the Graphene Mobile theme load up the custom style.css and functions.php files, all you need to do is place those files in the wp-content/uploads/graphene-mobile-custom/. Graphene Mobile will then check if those files exist, and load them if they do.

Like normal child themes, the style.css file will be loaded after the theme’s style.css file, whereas the functions.php file is will be loaded before the theme’s own functions.php file. This allows you to override the theme’s styles and functions more easily.

I would love to hear your thoughts on this feature, so if you have any comments or suggestions, make sure you submit them below. Enjoy!

  • Joe

    Does that mean that I have to have a copy of the style.css which I have in wp-content/themes/graphene-child/ folder also in the wp-content/uploads/graphene-mobile-custom/ folder and manually change it everytime I change something in the graphene-child style.css?

    • No, you only need to add new CSS codes that you’d like to be applied to the theme, in the same way that normal WordPress child themes work.

  • Very useful feature. I wanted to customise the text of some messages, and make some messages invisible.
    For graphene (normal) I used a child theme as described at

    For graphene (mobile) I copied wp-content/themes/graphene-child/functions.php
    TO wp-content/uploads/graphene-mobile-custom/functions.php

    It worked immediately, although I further customised some text which had slightly different wording.

    My functions.php file looks like this:
    function graphene_filter_gettext( $translated, $original, $domain ) {
    $strings = array(
    'Category Archive: %s’ => ‘%s’,
    ‘Archive for:’ => ‘ ‘,
    ‘About the author’ => ‘About me’,
    ‘Leave a Reply’ => ‘Leave comment’,
    ‘Leave a reply’ => ‘Leave comment’,
    ‘No ping yet’ => ‘ ‘,
    ‘View full post’ => ‘Read more’,
    if ( ! empty( $strings[$original] ) ) {
    $translations = &get_translations_for_domain( $domain );
    $translated = $translations->translate( $strings[$original] );
    return $translated;
    add_filter( ‘gettext’, ‘graphene_filter_gettext’, 10, 3 );

  • ChrisW

    So how would I modify the footer.php for example without using a child theme for Graphene Mobile Neo?

    • syahirhakim

      Unfortunately due to the limitation mentioned above you won’t be able to replace the theme’s template files like you could with normal WordPress child themes. If there’s enough interest, we might look into expanding the child theme feature for Graphene Mobile Neo.

  • marguritei30

    Recently I was REALLY low on money and debts were eating me from all sides! That was UNTIL I decided to make money on the internet. I went to surveymoneymaker dot net, and started filling in surveys for cash, and surely I’ve been far more able to pay my bills!! I’m so glad, I did this!! – iW0W

Do NOT follow this link or you will be banned from the site!