• Resolved scamrwordpressadmin

    (@scamrwordpressadmin)


    Site: suncityanthemhikingclub.com
    Theme: Minamaze_Pro
    Child theme I created: Minamaze_Pro-child

    Problem: It appears that the parent (Minamaze_Pro) isn’t referenced at all. I must have all the parent files in the child directory for it to work.

    In testing I found that both get_template_directory_uri() and get_stylesheet_directory_uri() return the path to the child theme. (I have left the echos of these functions at the header of the site.)

    At the moment I have copied all the parent files to the child directory to get it up and running. But as soon as I remove those that will stay true to the parent theme, it crashes.

    I clearly have something wrong in my setup – but can’t find it. Any help appreciated.

    CHILD STYLE.CSS HEADER:
    /*
    THEME NAME: Minamaze Pro child
    THEME URI: http://suncityanthemhikingclub.com/Minamaze_Prochild/
    Description: Minamaze Child Theme
    Author: Kathleen Prince
    Author URI: http://suncityanthemhikingclub.com
    Template: nirvana
    Version: 1.0.0
    License: GNU General Public License v2 or later
    License URI: http://www.gnu.org/licenses/gpl-2.0.html
    Tags: light, dark, two-columns,right-sidebar,responsive-layout,accessibility-ready
    Text Domain: Minamaze_Pro-child
    */

    CHILD FUNCTIONS.PHP ENQUEUEING THE STYLES:

    function theme_enqueue_styles() {
    
        $parent_style = 'parent-style';
    
        wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
        wp_enqueue_style( 'child-style',
            get_stylesheet_directory_uri() . '/style.css',
            array( $parent_style )
        );
    
    }
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );

    [Moderator Note: Please post code between backticks or use the code button. Your posted code may now have been damaged by the forum’s parser.]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Not all themes – especially non-WPORG ones – are child theme ready.

    I’m sorry but as you appear to be using a commercial theme, you need to seek support from the theme’s developer/vendor. We do not have access to, nor do we support, commercial products here.

    Thread Starter scamrwordpressadmin

    (@scamrwordpressadmin)

    Hi. I understand the support of the theme particulars itself. I just wanted to make sure that I had set the child theme up correctly.

    Why both get_template_directory_uri() and get_stylesheet_directory_uri() return the same value seemed like a wordpress issue vs theme itself. But, I’m new at all of this. 🙂 So… Off to the theme developer I go….

    I can’t see anything obviously wrong in your child’s style.css header and, in theory, you shouldn’t need to enqueue your child’s CSS. You just @import the parent’s stylesheet into the child. However, I don’t know how the parent theme was put together and just how child-friendly it is (or isn’t). Some non-WPORG themes (especially commercial ones) use pretty non-standard methods and, as a result, can break child theme functionality in multiple places.

    Thread Starter scamrwordpressadmin

    (@scamrwordpressadmin)

    Thanks ESMI! I ended up just starting over from scratch and it works now. My only guess is that something that I just couldn’t see was stuck out there. Consider this closed.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Parent Theme Missing’ is closed to new replies.