• The docs say that your child style.css needs a reference to the parent theme style.css @import url(“../twentyeleven/style.css”);

    I am also overriding/extending functions.php and footer.php Do these files need to include a reference to the parent version (like style.css does), or can I just copy the entire file, make my edits, and WP will know to use the child version of the file?

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • I generally make a new ‘child’ functions with only the changes I need, but you can copy it and make changes and put it in your child theme folder.
    The same is true for your footer file.

    Thread Starter mathwriter

    (@mathwriter)

    So, it’s ok to redeclare a modified function in the child theme’s function.php? It will use that one, and ignore the one in the parent?

    Thread Starter mathwriter

    (@mathwriter)

    Note: I had to include “<?php” as the first line of my functions.php
    My newly added function works, and so does the overridden one.
    dragonsjaw, thanks for the help!

    Like I said, I always use a function.php for the child that only includes the changes I want to make to the parent.
    This is how mine starts (twentyten child theme)

    <?php
    function twentyten_setup() {
    
    	// Post Format support. You can also use the legacy "gallery" or "asides" (note the plural) categories.
    	add_theme_support( 'post-formats', array( 'aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio') );
    
    	// This theme uses post thumbnails
    	add_theme_support( 'post-thumbnails' );

    and the file ends with

    ?>

    And no white space before or after the php opening or closing.

    Screwing up your functions file will bring the site down faster than anything I have found out the hard way.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Quick question about making a child theme…’ is closed to new replies.