Child theme creation

  • Anonymous

    #8017

    Hello,

    I would like to create child functions.php, style css and comments php files for the GM Neo theme. I have a couple of questions about how to do it:

    1) What should I put in the header of the files?

    2) How can I “include()” or “require()” the comments php file in the functions php file?

    I would greatly appreciate your response.

    Admin

    Syahir Hakim

    #40071

    1) There’s no need to place any specific header for the files.

    2) Something like include( 'comments.php' ) will usually work, provided that the comments.php file resides in the same folder as the pseudo-child theme’s functions.php file. However, note that the comments.php file in your pseudo-child theme will not replace the theme’s comments.php file. This is a limitation of the pseudo-child theme implementation in the theme.

    If you’d like to create a full-fledged child theme for GM Neo, try using Any Mobile Theme Switcher instead of the bundled Mobile Smart plugin. From our preliminary testing, it does appear to be support switching to a child theme for mobile devices.

    Anonymous

    #40073

    Thank you very much for your reply. I already have a child theme for the desktop version of Graphene. If I create a full fledged child theme for GM Neo and use “Any mobile theme switcher” plugin would I still be able to activate my Graphene child theme?

    Also, if I decide to use the pseudo child theme for GM Neo, how does the child comments php file work? You said it does not replace the theme’s comments php file. Does this mean that I can only add additional code but not replace what’s already in the theme’s file?

    Anonymous

    #40074

    I forgot to mention one thing. The contents of my mobile child theme and desktop child theme would probably be the same.

    Admin

    Syahir Hakim

    #40075
    Quote:
    You said it does not replace the theme’s comments php file. Does this mean that I can only add additional code but not replace what’s already in the theme’s file?

    That is correct.

    Quote:
    I already have a child theme for the desktop version of Graphene. If I create a full fledged child theme for GM Neo and use “Any mobile theme switcher” plugin would I still be able to activate my Graphene child theme?

    Yes. You can only have one active theme at any given time, so that would be your Graphene child theme. In Any Mobile Theme Switcher, you’ll simply select the GM Neo child theme as the theme to switch to when it detects mobile devices. In other words, you’ll never need to activate the GM Neo child theme, and it won’t affect your Graphene child theme.

    Anonymous

    #40076

    Syahir,

    Thank you very much for your message. I tried activating the “Any mobile theme switcher” plugin but I get a blank page and the browser is not even trying to access the page. I have deactivated the Mobile Smart plugin. My site url is here. Could you please tell me, if possible, what could be causing this? I would greatly appreciate it.

Viewing 6 posts - 1 through 6 (of 6 total)

  • You must be logged in to reply to this topic.