• Resolved mjpg

    (@mjpg)


    I am testing Delicacy Version: 1.2.4.

    Thanks for this theme, which looks good.

    I started using a child theme, but had some errors.

    I have fixed a couple:

    functions.php line 160 – changed to:

    include RWMB_DIR . 'metabox-def.php';

    functions.php lines 234 to 240 – changed temporarily to:

    //if ( get_stylesheet_directory() == get_template_directory() ) {
    	define('OPTIONS_FRAMEWORK_URL', get_template_directory() . '/admin/');
    	define('OPTIONS_FRAMEWORK_DIRECTORY', get_template_directory_uri() . '/admin/');
    //} else {
    	//define('OPTIONS_FRAMEWORK_URL', get_stylesheet_directory() . '/admin/');
    	//define('OPTIONS_FRAMEWORK_DIRECTORY', get_stylesheet_directory_uri() . '/admin/');
    //}

    This stops the error messages, but there are still oddities.

    My child theme only has style.css and an @import for the CSS.

    Has anyone else got this to work OK with a child theme?

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    My child theme only has style.css and an @import for the CSS.

    Sorry, can you elaborate on how this is causing you issues?

    Thread Starter mjpg

    (@mjpg)

    Sorry – yes I should have stated the error:

    With no modifications to the delicacy functions.php I get this when a simple child theme is activated:

    Warning: require_once(/PATH-REMOVED/wp-content/themes/bcs/meta-box/meta-box.php) [function.require-once]: failed to open stream: No such file or directory in /PATH-REMOVED/wp-content/themes/delicacy/functions.php on line 157:

    I think the problem is here:

    // Re-define meta box path and URL
    define( 'RWMB_URL', trailingslashit( get_stylesheet_directory_uri() . '/meta-box' ) );
    define( 'RWMB_DIR', trailingslashit( get_stylesheet_directory() . '/meta-box' ) );

    And later on with the test for:

    if ( get_stylesheet_directory() == get_template_directory() ) {

    possibly should be

    if ( get_stylesheet_directory() != get_template_directory() ) {

    I think the above two sections of code are dealing wrongly with the case where there IS a child theme. Not sure though.

    Thanks

    Theme Author alex27

    (@alex27)

    For the child theme to work, you need to manually copy admin folder from Delicacy to your new child theme folder. It’s a bug though, and should be fixed in the next update (that will come somwhere in january).

    Thread Starter mjpg

    (@mjpg)

    Many thanks for your reply.

    Thread Starter mjpg

    (@mjpg)

    I tested this and just copying the admin folder does not work as the theme also asks for files from the meta folder.

    It works without error if you copy these folders to the child theme folder:

    delicacy/admin
    delicacy/meta-box

    However the styles are not applying correctly. I cannot quite see why.

    As it is now, I think the best option is to make changes to a copy of delicacy and make a note of what they are so you can move them to a child theme after the next release.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Using child themes’ is closed to new replies.