News Pro Theme – function.php error for } line 106

Community Forums Forums Design Tips and Tricks News Pro Theme – function.php error for } line 106

This topic is: not resolved

This topic contains 4 replies, has 2 voices, and was last updated by  CathieHeart 7 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #101084

    CathieHeart
    Member
    Post count: 2

    Hi there,

    I’m using the News Pro theme as my foundation child theme to build my clients website with. I wanted the rough layout that News Pro gives and the mobile responsive CSS without having to write it all from scratch myself.

    I’m facing a problem though.

    I’m finding that all my custom code that I’ve placed at the bottom of the functions.php file is not being acted upon by the browser. Even worse is that sometimes I add code that is 100% effective in other themes and it causes a standard error from the News Pro functions.php file:

    Parse error: syntax error, unexpected ‘}’ in /home/loveinpo/public_html/hcme/wp-content/themes/news-pro/functions.php on line 106

    There is no } on line 106! I’ve already read upwards to the beginning and there are NO stray }’s that I can find.

    Has anyone else had this problem with News Pro and adding additional code to the functions.php file?

    Thanks
    Cathie.

    http://hcme.loveinportraits.com/
    #101090

    AC
    Blocked
    Post count: 7712

    Well, we’d have to see the code you are adding there to see why you are having the issues. Please post your code here and wrap it with the code button.

    #101126

    CathieHeart
    Member
    Post count: 2

    Here is all the code in the functions.php file:

    
    <?php
    
    //* Start the engine
    
    include_once( get_template_directory() . '/lib/init.php' );
    
    //* Set Localization (do not remove)
    
    load_child_theme_textdomain( 'news', apply_filters( 'child_theme_textdomain', get_stylesheet_directory() . '/languages', 'news' ) );
    
    //* Child theme (do not remove)
    
    define( 'CHILD_THEME_NAME', __( 'News Pro Theme', 'news' ) );
    
    define( 'CHILD_THEME_URL', 'http://my.studiopress.com/themes/news/' );
    
    define( 'CHILD_THEME_VERSION', '3.0.1' );
    
    //* Add HTML5 markup structure
    
    add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list' ) );
    
    //* Add viewport meta tag for mobile browsers
    
    add_theme_support( 'genesis-responsive-viewport' );
    
    //* Enqueue Raleway and Pathway Gothic Google fonts
    
    add_action( 'wp_enqueue_scripts', 'news_google_fonts' );
    
    function news_google_fonts() {
    
    	wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Open+Sans+Condensed:300,700|Oswald:400,300,700', array(), CHILD_THEME_VERSION );
    
    	
    
    }
    
    //* Add new image sizes
    
    add_image_size( 'home-bottom', 150, 150, TRUE );
    
    add_image_size( 'home-middle', 348, 180, TRUE );
    
    add_image_size( 'home-top', 740, 400, TRUE );
    
    //* Add support for custom background
    
    add_theme_support( 'custom-background' );
    
    //* Add support for custom header
    
    add_theme_support( 'custom-header', array(
    
    	'header_image'    => '',
    
    	'header-selector' => '.site-title a',
    
    	'header-text'     => false,
    
    	'height'          => 90,
    
    	'width'           => 260,
    
    ) );
    
    //* Add support for additional color style options
    
    add_theme_support( 'genesis-style-selector', array(
    
    	'hcme-orange' => __( 'Home Club Me - Orange', 'news' ),
    
    	'news-pro-blue'   => __( 'News Pro Blue', 'news' ),
    
    	'news-pro-green'  => __( 'News Pro Green', 'news' ),
    
    	'news-pro-pink'   => __( 'News Pro Pink', 'news' ),
    
    	'news-pro-orange' => __( 'News Pro Orange', 'news' ),
    
    ) );
    
    //* Add support for 6-column footer widgets
    add_theme_support( 'genesis-footer-widgets', 6 );
    
    //* Reposition the secondary navigation
    
    remove_action( 'genesis_after_header', 'genesis_do_subnav' );
    
    add_action( 'genesis_before_header', 'genesis_do_subnav' );
    
    //* Hook after entry widget after the entry content
    
    add_action( 'genesis_after_entry', 'news_after_entry', 5 );
    
    function news_after_entry() {
    
    	if ( is_singular( 'post' ) )
    
    		genesis_widget_area( 'after-entry', array(
    
    			'before' => '<div class="after-entry" class="widget-area">',
    
    			'after'  => '</div>',
    
    		) );
    
    }
    
    //* Remove comment form allowed tags
    
    add_filter( 'comment_form_defaults', 'news_remove_comment_form_allowed_tags' );
    
    function news_remove_comment_form_allowed_tags( $defaults ) {
    
    	$defaults['comment_notes_after'] = '';
    
    	return $defaults;
    
    }
    
    //* Register widget areas
    
    genesis_register_sidebar( array(
    
    	'id'          => 'home-top',
    
    	'name'        => __( 'Home - Top', 'news' ),
    
    	'description' => __( 'This is the top section of the homepage.', 'news' ),
    
    ) );
    
    genesis_register_sidebar( array(
    
    	'id'          => 'home-middle-left',
    
    	'name'        => __( 'Home - Middle Left', 'news' ),
    
    	'description' => __( 'This is the middle left section of the homepage.', 'news' ),
    
    ) );
    
    genesis_register_sidebar( array(
    
    	'id'          => 'home-middle-right',
    
    	'name'        => __( 'Home - Middle Right', 'news' ),
    
    	'description' => __( 'This is the middle right section of the homepage.', 'news' ),
    
    ) );
    
    genesis_register_sidebar( array(
    
    	'id'          => 'home-bottom',
    
    	'name'        => __( 'Home - Bottom', 'news' ),
    
    	'description' => __( 'This is the bottom section of the homepage.', 'news' ),
    
    ) );
    
    genesis_register_sidebar( array(
    
    	'id'          => 'after-entry',
    
    	'name'        => __( 'After Entry', 'news' ),
    
    	'description' => __( 'This is the after entry section.', 'news' ),
    
    ) );
    
    // My Code
    
    //* Add Structure Wrap Top								
    														
    add_filter( 'genesis_before', 'addStructureTop' );
    function addStructureTop() {
    ?><div class="outwrap"> <?php
    }
    //* Add Structure Wrap Bottom
    add_filter( 'genesis_after', 'addStructureBottom' );
    function addStructureBottom() {
    ?></div> <?php
    }
    
    // ** Add Header Brand Circle Logo
    function addHeaderLogo(){ ?>
    	<div class="headerLogo"><a href="http://www.brideclubme.com/" title="Bride Club Me" alt="Bride Club Me"><img src="<?php echo bloginfo('template_url');?>/images/header-logo.png"/></a></div>
    <?php }
    add_action('genesis_after_header','addHeaderLogo');
    
    // ** Add Header Brand Circle Logo
    function addHeaderWoman(){ ?>
    	<div class="headerWoman"><img src="<?php echo bloginfo('template_url');?>/images/header-woman.png"/></div>
    <?php }
    add_action('genesis_after_header','addHeaderWoman');
    
    //* Genesis Studio Press Code Modified
    
    //* Remove the site description
    remove_action( 'genesis_site_description', 'genesis_seo_site_description' );
    //* Remove the header right widget area
    unregister_sidebar( 'header-right' );
    
    //* Modify the WordPress read more link
    add_filter( 'the_content_more_link', 'sp_read_more_link' );
    function sp_read_more_link() {
    return '<a class="more-link" href="' . get_permalink() . '">[Continue Reading]</a>';
    }
    
    //* Customize the post meta function
    add_filter( 'genesis_post_meta', 'sp_post_meta_filter' );
    function sp_post_meta_filter($post_meta) {
    if ( !is_page() ) {
    $post_meta = '[post_categories before="Filed Under: "]';
    return $post_meta;
    }}
    
    //* Modify breadcrumb arguments.
    add_filter( 'genesis_breadcrumb_args', 'sp_breadcrumb_args' );
    function sp_breadcrumb_args( $args ) {
    $args['home'] = 'Home';
    $args['sep'] = ' / ';
    $args['list_sep'] = ', '; // Genesis 1.5 and later
    $args['prefix'] = '<div class="breadcrumb">';
    $args['suffix'] = '</div>';
    $args['heirarchial_attachments'] = true; // Genesis 1.5 and later
    $args['heirarchial_categories'] = true; // Genesis 1.5 and later
    $args['display'] = true;
    $args['labels']['prefix'] = 'You are here: ';
    $args['labels']['author'] = ' ';
    $args['labels']['category'] = ' '; // Genesis 1.6 and later
    $args['labels']['tag'] = ' ';
    $args['labels']['date'] = ' ';
    $args['labels']['search'] = 'Search for ';
    $args['labels']['tax'] = ' ';
    $args['labels']['post_type'] = ' ';
    $args['labels']['404'] = 'Not found: '; // Genesis 1.5 and later
    return $args;
    }
    
    //* Add Custom Post Type Archive Support with Genesis 2
    add_action('init', 'my_custom_init');
    function my_custom_init() {
    add_post_type_support( 'listing', 'genesis-cpt-archives-settings' );
    }
    

    Thank you.
    Cathie.

    #101129

    AC
    Blocked
    Post count: 7712

    My message stated:

    we’d have to see the code you are adding

    …not all of the code. What part of all that code is the code YOU ADDED….

    #101210

    CathieHeart
    Member
    Post count: 2

    Sorry .. here’s my part of the code.

    //* Add Structure Wrap Top								
    														
    add_filter( 'genesis_before', 'addStructureTop' );
    function addStructureTop() {
    ?><div class="outwrap"> <?php
    }
    //* Add Structure Wrap Bottom
    add_filter( 'genesis_after', 'addStructureBottom' );
    function addStructureBottom() {
    ?></div> <?php
    }
    
    // ** Add Header Brand Circle Logo
    function addHeaderLogo(){ ?>
    	<div class="headerLogo"><a href="http://www.brideclubme.com/" title="Bride Club Me" alt="Bride Club Me"><img src="<?php echo bloginfo('template_url');?>/images/header-logo.png"/></a></div>
    <?php }
    add_action('genesis_after_header','addHeaderLogo');
    
    // ** Add Header Brand Circle Logo
    function addHeaderWoman(){ ?>
    	<div class="headerWoman"><img src="<?php echo bloginfo('template_url');?>/images/header-woman.png"/></div>
    <?php }
    add_action('genesis_after_header','addHeaderWoman');
    

    Thank you for prompting me Anitac.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.