Support » Fixing WordPress » Parse error: syntax error, unexpected '

  • Resolved



    Using Hybrid and the child theme Structure. Getting a parse error on line 52 and I can’t seem to find it. Need a fresh set of eyes to take a look.

    Thanks in advance. Code is below.

    * This is your child theme's functions.php file.
    * You should make edits and add additional code above this point.
    * Only change the functions below if you know what you're doing.
    /* Localization. */
    load_child_theme_textdomain( 'structure', get_stylesheet_directory() . '/languages' );
    /* Actions. */
    add_action( 'hybrid_after_primary_menu', 'get_search_form' );
    add_action( 'widgets_init', 'structure_register_sidebars' );
    add_action( 'hybrid_header', 'structure_get_utility_header' );
    /* Filters. */
    add_filter( 'breadcrumb_trail', 'structure_disable' );
     * Register additional widget areas for the theme.
     * @since 2.1
     * @uses register_sidebar() Registers a new widget area.
    function structure_register_sidebars() {
    	register_sidebar( array( 'name' => __( 'Utility: Header', 'structure' ), 'id' => 'utility-header', 'before_widget' => '<div id="%1$s" class="widget %2$s widget-%2$s"><div class="widget-inside">', 'after_widget' => '</div></div>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>' ) );
     * Checks if the Utility: Header widget area is active.  If it is, it is
     * then wrapped with an appropriate element and displayed.
     * @since 2.0
     * @uses get_sidebar() Locates the sidebar template.
    function structure_get_utility_header() {
    	get_sidebar( 'header' );
     * Filter function for disabling variables. It returns false for everything.
     * @since 2.0
    function structure_disable( $var ) {
    	return false;

    [Moderator Note: Please post code or markup snippets between backticks or use the code button. Or better still – use the pastebin. As it stands, your code may now have been permanently damaged/corrupted by the forum’s parser.]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

    make sure you didn’t add extra space before <?php and after ?>

    make sure you didn’t forget single quote in your define() ..
    make sure all define() are ended with ;

    Moderator Andrew Nevins


    Which line is 52 and what is the entire error message?


    Entire error message:

    Parse error: syntax error, unexpected ‘<‘ in /home/mkyd1963/public_html/ on line 52


    Checking that now



    Forum Moderator

    Try switching to the Twenty Eleven theme by renaming:




    using FTP or whatever file management application your host provides.

    Fixed. Took a look at it from cpanel and found the ‘<‘. Didn’t show up in WP Editor for some reason. But thanks for the tip, esmi, I’ll keep that in mind. Appreciate Andrew and pwhstacy’s input too. Made me think outside the box..Thanks again

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Parse error: syntax error, unexpected '’ is closed to new replies.