until I try to copy over the dreaded functions.php
Never copy the functions.php file from the parent into the child. You have to create a new functions.php file in the child theme.
And I understand that esmi but I guess that’s just it. I don’t know how to start a new functions.php. I’ve come across some codes online but don’t know what I should start it off with. Should I start it off with a widgets code? I tried to put a code in for a new widget but it did not display under with my other widgets.
Thanks for answering me.
Your child theme’s functions.php should only be thing’s you’ve added. So, create a new text file and cut/paste anything you’ve added to your theme’s functions.php between an opening <?php and a closing ?>. Make sure there is absolutely no extra whitespace after the ?>. Then save it as functions.php and upload it to your child theme.
You might have already read it, but this explains things fairly well:
http://codex.ww.wp.xz.cn/Child_Themes#Using_functions.php
Figured it out! Thanks guys!
This is what my code looked like for my Constructor theme for those having the same probs.
<?php
if (!function_exists('register_sidebar')) {
// options for all follows sidebars
$widget_options = array(
'before_widget' => '<li id="%1$s" class="widget %2$s">',
'after_widget' => '</li>',
'before_title' => '<h3 class="widgettitle">',
'after_title' => '</h3>',
);
register_sidebar(array_merge($widget_options, array('id'=>'sidebar-pages5', 'name'=>'Home')));
}
sidebar5 and Home are what I added and what you would change to fit your own widgets.
Somehow I thought the above worked. It’s actually this:
<?php
// options for all follows sidebars
if (function_exists('register_sidebar')) {
$widget_options = array(
'before_widget' => '<li id="%1$s" class="widget %2$s">',
'after_widget' => '</li>',
'before_title' => '<h3 class="widgettitle">',
'after_title' => '</h3>',
);
register_sidebar(array_merge($widget_options, array('id'=>'extra1','name'=>'Home')));
}
The ‘extra1’ should go in numerical order ‘extra2’ and so forth and replace ‘Home’ with your own name of widget.