• Resolved EddieVd

    (@eddievd)


    Has anyone gotten a child theme to work with Tonal?

    This is my style sheet:

    /*
     Theme Name:   Tonal Child
     Theme URI:    http://example.com/twenty-fourteen-child/
     Description:  Tonal Child Theme
     Author:       John Doe
     Author URI:   http://example.com
     Template:     tonal
     Version:      1.0.4
     Tags:         light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
     Text Domain:  tonal2014
    */
    
    /* =Theme customization starts here
    -------------------------------------------------------------- */

    and my functions php:

    <?php
    
    add_action( 'wp_enqueue_scripts', 'enqueue_parent_theme_style');
    function enqueue_parent_theme_style() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
    }
    ?>

    What am I missing?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Try changing this:

    wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );

    to this:

    wp_enqueue_style( 'tonal', get_template_directory_uri().'/style.css' );

    And in your stylesheet, change this:

    Text Domain: tonal2014

    to this:

    Text Domain:  tonal

    That worked for me. Let me know how it goes.

    Thread Starter EddieVd

    (@eddievd)

    No luck unfortunately…although it does work if I put “!important” in my css.

    I’m doing a test on akamundo.com for the next little while if you want to have a look. (notice that I can remove the left #page border css with a “!important”, but otherwise, custom css still not working.

    Thanks

    I’m getting a “maintenance” notice on that site. I’ll be back tomorrow if you’re able to make the site public so I can have a look.

    Also, if your child theme can be activated but your CSS isn’t being picked up without using !important, it means that your selectors are not specific enough. Try using a browser inspector to troubleshoot the element and if you still need help I’ll be glad to have another look tomorrow.

    Thread Starter EddieVd

    (@eddievd)

    Thanks, I’ve given up!

    I spoke with Tonal’s creator and the reason you need !important in this case is that the theme uses special functions in inc/tonal-styling.php for background colours. It’s not possible to override those functions in a child theme, so !important is your best route in this particular situation to achieve the effect you want with the page borders removed.

    Thread Starter EddieVd

    (@eddievd)

    Thanks for your time Kathryn, I appreciate it…
    It seems weird/against everyone’s best interests that a theme would be child theme incompatible. I suppose there where good reasons for that during the build.

    Thanks again

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

The topic ‘Child theme not working’ is closed to new replies.