Support » Theme: Simone » child of Simone stylesheet not loading?

  • Resolved susantau

    (@susantau)


    My goal is to build a child of the Simone theme. I think there is a particular issue about child stylesheet loading with the Simone theme.

    Am I loading my stylesheet correctly?

    Here is what is at the top of my child theme style.css file:

    /*
    Theme Name: Simone Child for SRP
    Theme URI: http://siliconrun.com/wp-jun2016/wp-content/themes/simone-child-srp/
    Description: Child theme built for SRP based on Simone by Morten Rand-Hendriksen
    Author: Susan Taunton
    Author URI: http://wildbluepixel.com
    Template: simone
    Version: 0.0.1
    License:      GNU General Public License v2 or later
    License URI:  http://www.gnu.org/licenses/gpl-2.0.html
    */

    This is in my child theme functions.php file:

    add_action( 'wp_enqueue_scripts', 'dequeue_parent_theme_styles', 11 );
     function dequeue_parent_theme_styles() {
          wp_dequeue_style( 'simone-parent-style' );
          wp_dequeue_style( 'simone-layout' );
      }

    Here’s the home page of my site-in-progress.
    http://siliconrun.com/wp-jun2016/

    The dotty background (which I don’t want behind the page or post content), appears when I activate my child of Simone theme. Also page margins disappear when I activate my child of Simone theme.

    I also find I am unable to remove the top and bottom space from above and below the title box in the masthead section. Normally, I would expect adding the style below to the child theme stylesheet would do that:

    div.site-branding {
    padding:0;
    }

    But it doesn’t.

    And that is the only style I have in my child theme stylesheet.

    Thank you for any helpful insights!

Viewing 5 replies - 1 through 5 (of 5 total)
  • THIS JUST IN:

    The child theme style sheet is loading. And I was able to remove the dotty background using the Customize feature.

    But still no margins on the pages, and also the sidebar appears below the content instead of at the right.

    My question is getting littler and littler, that’s hopeful!

    I removed my one style from the child stylesheet and I removed the logo so the child theme should now be exactly the same as the parent Simone theme, but in the child theme there are no page margins and the right sidebar drops down below the page content and I can’t affect the sidebar in the Sidebar Customizer.

    Why would the child theme not display correctly if nothing has been modified in it?

    The problem described at the beginning of this thread in which my child stylesheet seemed to not be loading: I have discovered that my host features SUPERCACHER. I disabled that and changes to the stylesheet now take effect.

    Which suggests the missing margins and misplaced sidebar could be a different issue…

    WordPress.org Monitor, should I be starting a new thread?

    EUREKA! With Simone, instead of using the WordPress.org Codex recommended function that loads a parent stylesheet and then your child stylesheet, use this one:

    <?php
    function enqueue_child_theme_styles() {
      wp_enqueue_style( 'child-style', get_stylesheet_uri(), array('[parent_theme_name]-style') );
    }
    add_action( 'wp_enqueue_scripts', 'enqueue_child_theme_styles', PHP_INT_MAX);

    In Simone, there is more than just one simple parent stylesheet. So when I was using the usual enqueue function, at least one Simone stylesheet was not getting loaded. If you want to understand a lot better, read Morten’s very clear explanation here:
    https://mor10.com/challenges-new-method-inheriting-parent-styles-wordpress-child-themes/

    And, btw, this is not a problem with Simone – this will happen with any theme that doesn’t keep all of its styles in the single file, style.css. You can read further about this at the link I posted in the above comment. I have no complaints about Simone, I love this theme. Simone also features detailed instruction on how to use it out of the box and how to expand it to a One Page Site at lynda.com.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘child of Simone stylesheet not loading?’ is closed to new replies.