• Resolved amanandhishoe

    (@amanandhishoe)


    I made a child theme for TwentySeventeen, and noticed that even though the style.css had no css yet, just activating the child theme made my site appear differently. I would have thought that at that point, the site would appear the same.

    THe difference is that when TwentySeventeen is active, the page title and page content appear in a single column. When the child theme is active, the page title is on the left and the page content on the right.

    I would have thought that if there is no css in the child theme, that the parent theme would determine all aspects of how the pages are displayed.

    The style.css is:

    /*
    Theme Name: Twenty Seventeen Child Theme
    Description: A child theme for use with WordPress Twenty Seventeen Theme.
    Author: me
    Author URI: me
    Template: twentyseventeen
    Version: 1.0.0
    */

    /* Add Custom CSS after this line */

    The functions.php is:

    <?php
    function mytheme_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’, ‘mytheme_enqueue_styles’ );
    ?>

Viewing 1 replies (of 1 total)
  • Thread Starter amanandhishoe

    (@amanandhishoe)

    I did a bit more research and the problem is that twentyseven theme lets you set the site to be one column or two column with two column being the default.

    However, the setting for using one or two columns does not appear if if you the front page set to display your latest posts. If you set your front page to be a static page, then twentyseven shows a Theme Options selection in the list of customizable items.

    Whether you want your pages to be one or two columns should be independent of whether you want your front page to be a static page or show your latest posts.

    My childtheme is working as expected.

Viewing 1 replies (of 1 total)
  • The topic ‘Problems with empty child’ is closed to new replies.