Home Forums Panda WordPress Theme Child Theme not working

This topic contains 13 replies, has 3 voices, and was last updated by  Johnny 3 years, 9 months ago.

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #2251

    sonnyside
    Participant

    Hi

    I am trying to make a child theme, but when it seems to be working, I end up with a blank screen, both frontend and backend.

    You can see my code below, what am I doing wrong?

    Best Regards
    Sonny

    
    /*
    Theme Name: Panda Child
    Theme URI: http://www.uiueux.com
    Description: Panda Respondsive WordPress Theme.
    Author: UXteam / Bwsm
    Author URI: http://www.uiueux.com
    Template: panda
    Version: 1.4.1
    Tags: dark, light, white, black, gray, one-column, two-columns, left-sidebar, right-sidebar, fixed-width, flexible-width, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-image-header, featured-images, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready
     Text Domain:  panda-child 
    */
    
    @import url("../panda/style.css");
    
    /* =Theme customization starts here
    -------------------------------------------------------------- */
    
    #2254

    BWSM
    Keymaster

    Please try to use the child them attached.

    And you need to change the “Loads the Options Panel” function code in functions.php(near line 587) as:

    if ( !function_exists( 'optionsframework_init' ) ) {
        define( 'OPTIONS_FRAMEWORK_DIRECTORY', get_bloginfo('template_directory') . '/functions/option/' );
        require_once dirname( __FILE__ ) . '/functions/option/options-framework.php';
    }
    
    #2267

    sonnyside
    Participant

    I can´t get this to work.

    I managed to get the child theme active, but my widgets was deleted, and my site did not inhert the settings from the parent theme.

    Could you please tell me exactly what I need to do?

    Thank you for your help so far.

    #2268

    Johnny
    Participant

    hi, please try this: make a dir named ‘functions’ under child theme, copy dir ‘option’ under panda/functions/ into it.
    I have test it on my local machine, it worked.
    Best

    #2271

    sonnyside
    Participant

    Thanks, this works a little bit better 🙂

    I am still having a few problems though:

    The custom CSS code from inside the theme settings disapears when I activate the child theme
    The site logo also disapears, as well as the menu settings.

    It is no problem to do theses settings again in the child theme, but I am a bit worried that something may be wrong, when the child theme apparently does,nt inherit everything from the parent theme.

    I have replaced this piece of code from functions.php

    if ( !function_exists( 'optionsframework_init' ) ) {
    
    	/* Set the file path based on whether we're in a child theme or parent theme */
    
    /*
    
    	if ( STYLESHEETPATH == TEMPLATEPATH ) {
    
    		define('OPTIONS_FRAMEWORK_URL', TEMPLATEPATH . '/functions/option/');
    
    		define('OPTIONS_FRAMEWORK_DIRECTORY', get_template_directory_uri() . '/functions/option/');
    
    	} else {
    
    		define('OPTIONS_FRAMEWORK_URL', STYLESHEETPATH . '/functions/option/');
    
    		define('OPTIONS_FRAMEWORK_DIRECTORY', get_template_directory_uri() . '/functions/option/');
    
    	}
    
    	require_once (OPTIONS_FRAMEWORK_URL . 'options-framework.php');
    
    }
    

    with the piece of code you provided

    if ( !function_exists( 'optionsframework_init' ) ) {
        define( 'OPTIONS_FRAMEWORK_DIRECTORY', get_bloginfo('template_directory') . '/functions/option/' );
        require_once dirname( __FILE__ ) . '/functions/option/options-framework.php';
    }
    #2282

    Johnny
    Participant

    hi, in child theme file style.css should be have this line @import url("../panda/style.css");, this make child theme inherit parents css style.
    if you copied parent theme option dir to the child theme, I think that is not needed to modify the functions.php codes.
    Best

    #2296

    sonnyside
    Participant

    Hmm it’s still not working :/

    It is the theme settings that are missing, the custom logo, the custom css and the menu settings.

    My installation is currently running in the subfolder wp/ is that a problem perhaps?

    #2311

    Johnny
    Participant

    Hi, subfolder should not be cause the problem. please check whether your parent theme still works, if that is true, I think the problem may be in the child theme.
    Best

    #2312

    sonnyside
    Participant

    Parent theme works fine

    #2313

    sonnyside
    Participant

    The layerslider is also missing from the right menu when I activate the child theme

    #2314

    Johnny
    Participant

    Hi, copy dir LayerSlider under panda/functions/ to child theme functions dir will work.
    to let child theme work properly, may be this link help you:
    http://wordpress.stackexchange.com/questions/109637/how-do-themes-provide-support-for-child-themes
    good luck

    #2338

    sonnyside
    Participant

    Thank you very much for your help 🙂

    I am not sure what your part is, are you the developer of the theme?

    I am a little disappointed that I am not able to just make a standard child theme, and I can’t help but to worry a little about when I will need to update the theme, do you Think I will have any problems with that?

    How do I make sure that themes I buy in the future is child theme friendly, do you know that?

    #2339

    sonnyside
    Participant

    Actually the stylesheet in the child theme folder is not being used, it is visible in the editor when the child theme is activated, but the changes I make is not being used.

    The css changes I make in the theme custom css section is being used, do you know what is wrong here?

    #2363

    Johnny
    Participant

    Hi, child theme is good idea, but may not be a easy way. if you don’t mind leaving you site login info here through private message(check option ‘Set as private reply’), I will check it from backend later.
    Best

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

You must be logged in to reply to this topic.