WordPress.org

Ready to get started?Download WordPress

Forums

SmartAdapt
Creating a Child Theme? (5 posts)

  1. Santiago Ruiz
    Member
    Posted 1 year ago #

    I very much like this theme, but I would like to modify some of the other elements beyond what is allowed in the customize menu. I tried creating a child theme using the normal method, but, with the way the theme is written, it never looks for the child theme's style.css. In particular this seems to be where that all happens in the header.php file:

    //display custom header code (Theme Customization)
       echo  smartadapt_option( 'custom_code_header' );

    I'd rather not have to tinker with the php, so I thought I would check here first. Is there a way to make a child theme of SmartAdapt without editing the php?

  2. netbiel
    Member
    Theme Author

    Posted 1 year ago #

    Hi

    I've never tested the ability to create child theme SmartAdapt. I'm working on next version so I will check it and possibly improve all errors which makes it difficult to create a child theme.

    Thanks for your feedback, if you're right, this is my big mistake.

  3. aloeroot
    Member
    Posted 1 year ago #

    Santiago, I've been attempting the same thing. I was able to get around the problem by adding this to the header.php file in my child theme:

    <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />

    directly underneath

    //display custom header code (Theme Customization)
    	echo  smartadapt_option( 'custom_code_header' );
        wp_head();
    
        ?>

    This had the effect of letting my custom style sheet override the master one from the parent theme.

    Netbiel, it would still be very nice to have the parent updated to make this a non-problem. Thank you - lovely theme.

  4. netbiel
    Member
    Theme Author

    Posted 1 year ago #

    Hi

    I updated SmartAdapt today, version 1.0.4 is now live. I removed 'echo ...' from header.php. This function is hooked to wp_head action.
    Sorry for the long response time :)

    Thanks you for your feedback!

  5. aloeroot
    Member
    Posted 1 year ago #

    Thanks Netbiel; I updated your theme and re-made my child theme. For some reason it's still defaulting back to the style sheet for your parent. I can only get my customizations to appear by adding a style sheet link under the updated code in header.php:

    <?php
    
    wp_head();
    ?>
    <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />

    This isn't a huge problem as the workaround works, but if you're trying to make a child theme possible I think there's still something missing.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic