• 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

Education Pro – Parse error

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 › General Discussion › Education Pro – Parse error

This topic is: not resolved

Tagged: Parse Error

  • This topic has 5 replies, 2 voices, and was last updated 9 years, 6 months ago by bviva.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • May 18, 2016 at 7:58 pm #185871
    bviva
    Member

    I seemed to have messed up one of the php files in my theme.

    I get the following error: Parse error: syntax error, unexpected T_RETURN, expecting '{' in /home4/aktender/public_html/AITA/wp-content/themes/education-pro/functions.php on line 98

    Below is a copy of my functions.php file. I don't know what is wrong (I am not a php person)

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

    //* Setup Theme
    include_once( get_stylesheet_directory() . '/lib/theme-defaults.php' );

    //* Set Localization (do not remove)
    load_child_theme_textdomain( 'education', apply_filters( 'child_theme_textdomain', get_stylesheet_directory() . '/languages', 'education' ) );

    //* Child theme (do not remove)
    define( 'CHILD_THEME_NAME', __( 'Education Pro Theme', 'education' ) );
    define( 'CHILD_THEME_URL', 'http://my.studiopress.com/themes/education/' );
    define( 'CHILD_THEME_VERSION', '3.0.0' );

    //* Add HTML5 markup structure
    add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', ) );

    //* Add viewport meta tag for mobile browsers
    add_theme_support( 'genesis-responsive-viewport' );

    //* Enqueue Scripts
    add_action( 'wp_enqueue_scripts', 'education_load_scripts' );
    function education_load_scripts() {

    wp_enqueue_script( 'education-responsive-menu', get_bloginfo( 'stylesheet_directory' ) . '/js/responsive-menu.js', array( 'jquery' ), '1.0.0' );

    wp_enqueue_style( 'dashicons' );

    wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Roboto+Condensed:300,700', array(), CHILD_THEME_VERSION );

    }

    //* Add new image sizes
    add_image_size( 'slider', 1600, 800, TRUE );
    add_image_size( 'sidebar', 280, 150, TRUE );

    //* Add support for custom header
    add_theme_support( 'custom-header', array(
    'width' => 300,
    'height' => 100,
    'header-selector' => '.site-title a',
    'header-text' => false,
    ) );

    //* Add support for custom background
    add_theme_support( 'custom-background' );

    //* Add support for additional color style options
    add_theme_support( 'genesis-style-selector', array(
    'education-pro-blue' => __( 'Education Pro Blue', 'education' ),
    'education-pro-green' => __( 'Education Pro Green', 'education' ),
    'education-pro-red' => __( 'Education Pro Red', 'education' ),
    'education-pro-purple' => __( 'Education Pro Purple', 'education' ),
    ) );

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

    //* Add support for after entry widget
    add_theme_support( 'genesis-after-entry-widget-area' );

    //* Reposition the primary navigation menu
    remove_action( 'genesis_after_header', 'genesis_do_nav' );
    add_action( 'genesis_before_header', 'genesis_do_nav' );

    //* Reposition the secondary navigation menu
    remove_action( 'genesis_after_header', 'genesis_do_subnav' );
    add_action( 'genesis_footer', 'genesis_do_subnav', 7 );

    //* Reduce the secondary navigation menu to one level depth
    add_filter( 'wp_nav_menu_args', 'education_secondary_menu_args' );
    function education_secondary_menu_args( $args ){

    if( 'secondary' != $args['theme_location'] )
    return $args;

    $args['depth'] = 1;
    return $args;

    }

    //* Reposition the entry meta in the entry header
    remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
    add_action( 'genesis_entry_header', 'genesis_post_info', 5 );

    //* Customize the entry meta in the entry header
    add_filter( 'genesis_post_info', 'education_post_info_filter' );
    function education_post_info_filter($post_info) {
    $post_info = '[post_date]';
    return $post_info;
    }

    //* Customize the entry meta in the entry footer
    add_filter( 'genesis_post_meta', 'education_post_meta_filter' );
    function education_post_meta_filter($post_meta) {
    $post_meta = 'Article by [post_author_posts_link][post_categories before=" / "] [post_tags before=" / "] [post_comments] [post_edit]'; return $post_meta;
    }

    //* Relocate after post widget
    remove_action( 'genesis_after_entry', 'genesis_after_entry_widget_area' );
    add_action( 'genesis_after_entry', 'genesis_after_entry_widget_area', 5 );

    //* Modify the size of the Gravatar in the author box
    add_filter( 'genesis_author_box_gravatar_size', 'parallax_author_box_gravatar' );
    function parallax_author_box_gravatar( $size ) {

    return 96;

    }

    //* Remove comment form allowed tags
    add_filter( 'comment_form_defaults', 'education_remove_comment_form_allowed_tags' );
    function education_remove_comment_form_allowed_tags( $defaults ) {

    $defaults['comment_notes_after'] = '';
    return $defaults;

    }

    //* Register widget areas
    genesis_register_sidebar( array(
    'id' => 'home-featured',
    'name' => __( 'Home - Featured', 'education' ),
    'description' => __( 'This is the featured section of the Home page.', 'education' ),
    ) );
    genesis_register_sidebar( array(
    'id' => 'home-top',
    'name' => __( 'Home - Top', 'education' ),
    'description' => __( 'This is the top section of the Home page.', 'education' ),
    ) );
    genesis_register_sidebar( array(
    'id' => 'home-middle',
    'name' => __( 'Home - Middle', 'education' ),
    'description' => __( 'This is the middle section of the Home page.', 'education' ),
    ) );
    genesis_register_sidebar( array(
    'id' => 'home-bottom',
    'name' => __( 'Home - Bottom', 'education' ),
    'description' => __( 'This is the bottom section of the Home page.', 'education' ),
    ) );

    add_filter( 'wp_nav_menu_items', 'theme_menu_extras', 10, 2 );
    /**
    * Filter menu items, appending either a search form or today's date.
    *
    * @param string $menu HTML string of list items.
    * @param stdClass $args Menu arguments.
    *
    * @return string Amended HTML string of list items.
    */
    function theme_menu_extras( $menu, $args ) {

    //* Change 'primary' to 'secondary' to add extras to the secondary navigation menu
    if ( 'primary' !== $args->theme_location )
    return $menu;

    //* Uncomment this block to add a search form to the navigation menu

    ob_start();
    get_search_form();
    $search = ob_get_clean();
    $menu .= '<li class="right search">' . $search . '';

    //* Uncomment this block to add the date to the navigation menu

    $menu .= '<li class="right date">' . date_i18n( get_option( 'date_format' ) ) . '';

    return $menu;

    }

    Can someone look over this coding and advise as to how to fix it?? Much appreciated.

    http://alaskatenders.org/AITA/
    May 18, 2016 at 8:26 pm #185872
    Genesis Developer
    Member

    Replace

    $menu .= '<li class="right search">' . $search . '';
    
    //* Uncomment this block to add the date to the navigation menu
    
    $menu .= '<li class="right date">' . date_i18n( get_option( 'date_format' ) ) . '';

    WITH

    $menu .= '<li class="right search">' . $search . '</li>';
    
    //* Uncomment this block to add the date to the navigation menu
    
    $menu .= '<li class="right date">' . date_i18n( get_option( 'date_format' ) ) . '</li>';

    Download Genesis Featured Posts Combo Widget | Simple Grid Layouts Plugin for Posts, CPTs and terms
    You can request new tips/help.

    May 19, 2016 at 7:57 am #185894
    bviva
    Member

    Thank you very much for your response. I replaced the code as you suggested. Had to access the file via c-panel as I cannot get into the site via WP interface. I am still getting the error. I was trying to remove the author name from appearing on on posts when everything went sideways. Can you look at this code and see if I made a mistake there?

    //* //* Customize the entry meta in the entry footer
    add_filter( 'genesis_post_meta', 'education_post_meta_filter' );
    function education_post_meta_filter($post_meta) /*{
    $post_meta = 'Article by [post_author_posts_link] [post_categories before=" / "] [post_tags before=" / "] [post_comments] [post_edit]';*/
    return $post_meta;
    }

    //* Relocate after post widget
    remove_action( 'genesis_after_entry', 'genesis_after_entry_widget_area' );
    add_action( 'genesis_after_entry', 'genesis_after_entry_widget_area', 5 );

    //* Modify the size of the Gravatar in the author box
    add_filter( 'genesis_author_box_gravatar_size', 'parallax_author_box_gravatar' );
    function parallax_author_box_gravatar( $size ) {

    return 96;

    }

    May 19, 2016 at 8:16 am #185895
    bviva
    Member

    YEA!! I found my error and corrected it and am now up and running again. I tried to comment out the author name and that was not the correct wsay to remove author name from postings ( I see that now :))

    If anyone has a good way to remove author name from postings - please pass it on.

    Many thanks!!!

    May 19, 2016 at 8:22 am #185896
    Genesis Developer
    Member

    Replace

    //* Customize the entry meta in the entry footer
    add_filter( 'genesis_post_meta', 'education_post_meta_filter' );
    function education_post_meta_filter($post_meta) {
    $post_meta = 'Article by [post_author_posts_link][post_categories before=" / "] [post_tags before=" / "] [post_comments] [post_edit]'; return $post_meta;
    }

    WITH

    //* Customize the entry meta in the entry footer
    add_filter( 'genesis_post_meta', 'education_post_meta_filter' );
    function education_post_meta_filter($post_meta) {
     $post_meta = '[post_categories before=" / "] [post_tags before=" / "] [post_comments] [post_edit]';
     return $post_meta;
    }

    First you'll keep a backup of your current file and update it.


    Download Genesis Featured Posts Combo Widget | Simple Grid Layouts Plugin for Posts, CPTs and terms
    You can request new tips/help.

    May 19, 2016 at 9:33 am #185897
    bviva
    Member

    Thanks very much - all works well. Just need to figure out how to remove the "By" word after my posts. But am getting somewhere, thanks to you and this forum.

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘General Discussion’ 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