• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Parse Error in functions file

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Parse Error in functions file

This topic is: resolved

Tagged: functions file, Parse Error

  • This topic has 6 replies, 2 voices, and was last updated 12 years, 3 months ago by Brad Dalton.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • September 1, 2013 at 10:42 pm #60192
    Venice22
    Member

    Hi,

    Can anyone please help me? I was adding some code to the functions file when I got this message.

    "Parse error: syntax error, unexpected '<' in /home/lisfer6/effortlessglutenfree.com/wp-content/themes/balance/functions.php on line 109"

    I can't see what the problem might be. It looks to me like there are only 107 lines. Here is the full contents of the functions file. Would really appreciate any assistance of advice anyone can give me.

    <?php
    /** Start the engine */
    require_once( get_template_directory() . '/lib/init.php' );

    /** Child theme (do not remove) */
    define( 'CHILD_THEME_NAME', 'Balance Theme' );
    define( 'CHILD_THEME_URL', 'http://www.studiopress.com/themes/balance' );

    /** Create additional color style options */
    add_theme_support( 'genesis-style-selector', array( 'balance-blue' => 'Blue', 'balance-green' => 'Green', 'balance-turquoise' => 'Turquoise', 'balance-pink' => 'Pink' ) );

    /** Add support for structural wraps */
    add_theme_support( 'genesis-structural-wraps', array( 'header', 'nav', 'subnav', 'inner', 'footer-widgets', 'footer' ) );

    /** Add new image sizes */
    add_image_size( 'grid', 295, 100, TRUE );
    add_image_size( 'portfolio', 300, 200, TRUE );

    /** Add Viewport meta tag for mobile browsers */
    add_action( 'genesis_meta', 'balance_viewport_meta_tag' );
    function balance_viewport_meta_tag() {
    echo '<meta name="viewport" content="width=device-width, initial-scale=1.0"/>';
    }

    /** Unregister layout settings */
    genesis_unregister_layout( 'content-sidebar-sidebar' );
    genesis_unregister_layout( 'sidebar-content-sidebar' );
    genesis_unregister_layout( 'sidebar-sidebar-content' );

    /** Add support for custom background */
    add_custom_background();

    /** Add support for custom header */
    add_theme_support( 'genesis-custom-header', array( 'width' => 960, 'height' => 135 ) );

    /** Reposition post info */
    remove_action( 'genesis_before_post_content', 'genesis_post_info' );
    add_action( 'genesis_before_post_title', 'genesis_post_info' );

    /** Customize the post info function */
    add_filter( 'genesis_post_info', 'post_info_filter' );
    function post_info_filter($post_info) {
    if (!is_page()) {
    $post_info = '[post_author_posts_link] [post_date]';
    return $post_info;
    }
    }

    /** Customize the post meta function */
    add_filter( 'genesis_post_meta', 'post_meta_filter' );
    function post_meta_filter($post_meta) {
    if (!is_page()) {
    $post_meta = '[post_categories] [post_edit] [post_tags] [post_comments]';
    return $post_meta;
    }
    }

    /** Customize 'Read More' text */
    add_filter( 'get_the_content_more_link', 'balance_read_more_link' );
    add_filter( 'the_content_more_link', 'balance_read_more_link' );
    function balance_read_more_link() {
    return '' . __( 'Continue Reading' ) . '';
    }

    /** Customize search button text */
    add_filter( 'genesis_search_button_text', 'custom_search_button_text' );
    function custom_search_button_text($text) {
    return esc_attr('');
    }

    /** Reposition the breadcrumbs */
    remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
    add_action( 'genesis_after_header', 'genesis_do_breadcrumbs' );

    /** Customize breadcrumbs display */
    add_filter( 'genesis_breadcrumb_args', 'balance_breadcrumb_args' );
    function balance_breadcrumb_args( $args ) {
    $args['home'] = 'Home';
    $args['sep'] = ' ';
    $args['list_sep'] = ', '; // Genesis 1.5 and later
    $args['prefix'] = '<div class="breadcrumb"><div class="wrap">';
    $args['suffix'] = '</div></div>';
    $args['labels']['prefix'] = '<span class="home">You are here:</span>';
    return $args;
    }

    /** Add support for 3-column footer widgets */
    add_theme_support( 'genesis-footer-widgets', 3 );

    /** Register widget areas */
    genesis_register_sidebar( array(
    'id' => 'home-featured-left',
    'name' => __( 'Home Featured Left', 'balance' ),
    'description' => __( 'This is the featured left area on the homepage.', 'balance' ),
    ) );

    genesis_register_sidebar( array(
    'id' => 'home-featured-right',
    'name' => __( 'Home Featured Right', 'balance' ),
    'description' => __( 'This is the featured right area on the homepage.', 'balance' ),
    ) );

    genesis_register_sidebar( array(
    'id' => 'portfolio',
    'name' => __( 'Portfolio', 'balance' ),
    'description' => __( 'This is the portfolio page.', 'balance' ),
    ) );

    Thank you:)

    http://effortlessglutenfree.com
    September 1, 2013 at 10:59 pm #60198
    Brad Dalton
    Participant

    Remove the ‘<’ on line 109

    Or download a backup of this file locally and upload a backup of your child themes functions file


    Tutorials for StudioPress Themes.

    September 1, 2013 at 11:42 pm #60201
    Venice22
    Member

    Hi, Brad.
    There isn't a line 109. It only goes up to 107. I tried downloading the original child theme functions file and it still comes up with this message. Seems strange. Am sure is something I've overlooked but can't see it. At the same time this error message came up i added some new code to the bottom the child theme style sheet. Could this have something to do with the error message?

    Any other ideas??

    Cheers,
    L

    September 1, 2013 at 11:50 pm #60202
    Venice22
    Member

    Actually, I haven't uploaded the file, I just found the functions file I downloaded originally from Genesis and then copied and pasted it into the editor. Is this the same thing?

    September 2, 2013 at 5:13 am #60219
    Brad Dalton
    Participant

    Yes but not recommended. Better to download a copy of your current file which is causing errors and then upload a fresh copy.

    You might want to do the same with your style.css file after taking a backup of your theme.

    Or you can send me FTP or cPanel login details and i'll take a quick look. [email protected]


    Tutorials for StudioPress Themes.

    September 3, 2013 at 3:23 pm #60501
    Venice22
    Member

    Thanks for you help Brad. I have just tried what you said, nervously, and wallah - it worked. Thanks so much. Really appreciate it.

    Now I can see that I hadn't read the code I'd copied in and there was definitely a problem with it. Was obvious when I looked at the actual file.

    Anyway, cheers!
    Lisa

    September 3, 2013 at 7:17 pm #60543
    Brad Dalton
    Participant

    Hi Lisa

    Was just about to login and take a look. Been snowed under. Glad you fixed it yourself.


    Tutorials for StudioPress Themes.

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble