Support » Fixing WordPress » How Do You Properly Create Child Theme?

  • Resolved rixtertrader


    I needed to add two functions to functions.php for my site in order to remove the WP logo and the PRIVATE string from private pages.

    Because I’ve read that I should not tinker with the ‘core’ files in case of ‘updating’, etc., I went the CHILD THEME route.

    According to the instructions, I created a new subdirectory under /themes called /twentyten-child.

    In this subdirectory, I added a style.css file with the header info:

    Theme Name: Twenty Ten Child
    Description: Child theme for the Twenty Ten theme
    Author: Rixter
    Template: twentyten

    @import url(“../twentyten/style.css”);

    Nothing else in this file. No changes to styles, etc.

    Then I added a functions.php file into the child theme directory. This is all that it has in it.


    // Rick’s attempt to filtering out PRIVATE
    function remove_private_prefix($title) {
    $title = str_replace(
    return $title;

    /* Rick added this code to remove WP logo menu items */
    add_action( ‘admin_bar_menu’, ‘remove_wp_logo’, 999 );

    function remove_wp_logo( $wp_admin_bar ) {


    Then in my DASHBOARD under THEMES, I choose my Twentyten-Child theme.

    Well, my modifications worked just fine! I was thrilled! My first attempt at this. Woo hoo!

    But then, I noticed that when I try to create a POST and click on UPDATE, my page goes blank. I have to go to my sites URL to get back into the DASHBOARD.

    What did I miss? Was there something else I have to add to my child theme directory so that everything else works as before?

    I assumed that everything in the original Twentyten theme should work as before, except I’ve added two new functions.

    Help please.

    Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Are you sure it is the functions causing the problem? Does everything work if you remove the code in functions.php?

    Yes, everything works when the functions.php file is deleted.

    The problem, as it turns out, is that you cannot have any blank lines at the end of the functions.php file. This apparently confuses the redirect, resulting in the blank page.

    It’s working now, and I’ve been able to put my functions back in the file (without blank lines follwing the last code line).

    Works good.


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How Do You Properly Create Child Theme?’ is closed to new replies.