ThemeShaper Forums » Thematic

Child Theme Error Message

(5 posts)
  • Started 10 years ago by pab1953
  • Latest reply from pab1953
  • This topic is resolved
  1. pab1953
    Member

    Ian, in "How I used a WordPress Child Theme To Redesign My Blog The Smart Way" http://themeshaper.com/functions-php-wordpress-child-themes/ you suggest adding a block of code to functions.php to make it easy to customize the blogs horizontal menu bar. When I do this, and apply the child theme, in WP, I get the following error:

    Parse error: syntax error, unexpected '}' in /home/content/w/h/a/whatpeople/html/wp-content/themes/wpchild/functions.php on line 11

    I'm not sure if my "line 11" is the same as yours. Mine is "<?php }" LIne 12 is blank and Line 13 is "add_filter( 'sandbox_menu', 'childtheme_menu' );"

    Posted 10 years ago #
  2. Does your functions.php start with <?php on the first line and end with ?> on the last line?

    Posted 10 years ago #
  3. pab1953
    Member

    "Does your functions.php start with <?php on the first line and end with ?> on the last line?"

    I guess not. I simply copied and pasted the code (below) you said to put in functions.php. Did I misread something?

    function childtheme_menu() { ?>
    <div id="menu">

    </div>

    <?php }

    add_filter( 'sandbox_menu', 'childtheme_menu' );

    Posted 10 years ago #
  4. First things first: make a file in your Child Theme folder called functions.php and add the PHP opening and closing tags to the first and second line (<?php and ?>) using your favorite text editor (I use Smultron). Make sure you don’t have any extra lines before or after these tags. We’re going to be inserting the following snippets of code on the lines in-between these tags.

    Posted 10 years ago #
  5. pab1953
    Member

    Oops. Sorry. And thanks. :-|

    Posted 10 years ago #

RSS feed for this topic

Reply

You must log in to post.