Before you ask please READ THIS

How do I integrate files like "comments.php" into the child theme?

Hi,
I’m trying to understand how a child theme works, but I’m failing… :(

I made changes to all kind of PHP files like "comments.php", where I just deleted line 480:

<?php _fe( 'Comments are closed.' ); ?>

But how do I integrate a file like "comments.php" in a child theme? Just copying it in the child theme folder where "screenshot.png", "style.css" and "functions.php" are, doesn’t do the trick.

And what about files like "jackbox-packed.min.js" that are in subfolders (in this case: wp-content/themes/beach_apollo/js/jackbox/js)? How do I integrate such edited files into the child theme? I read the documentary over and over but I just don’t find a clue on how to do this…
Thanks a lot.

Comments

  • AirAir
    Posts: 10,970
    Hello there:-)
    Tupamaros said: But how do I integrate a file like "comments.php" in a child theme? Just copying it in the child theme folder where "screenshot.png", "style.css" and "functions.php" are, doesn’t do the trick.
    It should work, if your child theme is active.
    Tupamaros said: And what about files like "jackbox-packed.min.js" that are in subfolders (in this case: wp-content/themes/beach_apollo/js/jackbox/js)? How do I integrate such edited files into the child theme? I read the documentary over and over but I just don’t find a clue on how to do this…
    These files are not supported to be added to child theme, as it(child theme) was designed for simple overwrites.

    However two things:
    1. I have wrote instructions how to change JavaScript files in child theme for our different theme, so you can use it and try yourself to implement it http://apollo13.eu/docs/apollo13_framework_theme/#!/modification_of_theme_overwriting_javascript
    2. You can probably leave all your change in main theme, as Beach Please theme probably won't receive any important updates. I think in some time we will change its status to unsupported on ThemeForest, like we did for some of our legacy themes already.

    With kind regards.
  • edited October 2016 Posts: 111
    Thanks! Looks like I just wasn’t patient enough after purging the caches – or tried it with the wrong PHPs… Because: What about PHP files that aren’t in the theme’s root folder like options.php, meta.php and utilities.php (/advance). Creating an /advance subfolder in the child theme doesn’t seem to have an effect. Putting the PHP files into the root folder neither (which would’ve surprised me anyway).
    Post edited by Tupamaros on
  • AirAir
    Posts: 10,970
    This one is covered in documentation http://apollo13.eu/docs/beach/#!/modification_of_theme_changing_theme_functions
    More detailed explanation is written by me in different docs http://apollo13.eu/docs/apollo13_framework_theme/#!/modification_of_theme_changing_theme_functions

    So you don't copy whole files, but only functions that you have changed. In some cases if you modify to deep, there is no more sense in making child theme, as update will be hell anyway if you wish to have new features.

    With kind regards.
  • Posts: 111
    I still don’t really get it… :/
    But whatever: If Beach Please will be unsupported soon, it doesn’t really matter. Those few files can be updated easily in less than a minutes. So it’s all fine.
    Thank you very much!


    ----

    Just in case you have the time or feel the urge to explain it – hehe –, here’s what I want to add in functions.php from advance/meta.php (as an example):

    advance/meta.php line ~27. Original:

    array(
    'name' => '',
    'type' => 'fieldset',
    ),

    shall become:

    array(
    'name' => '',
    'type' => 'fieldset',
    ),
    array(
    'name' => __be( 'Subtitle' ),
    'desc' => '',
    'id' => 'subtitle',
    'default' => '',
    'type' => 'input'
    ),


    I don’t get how to integrate this in child theme’s functions.php
  • AirAir
    Posts: 10,970
    meta.php file is not possible to be placed in child theme. Sorry, for misleading you. meta.php is to big part of core of theme.

    With kind regards.
  • Posts: 111
    Alright. No problem at all. Thanks for your awesome support!
  • Posts: 111
    Enjoy your coffee with latte. ;)
  • AirAir
    Posts: 10,970
    Thanks a lot :-)

    See ya around.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!