Community Forums › Forums › Archived Forums › General Discussion › Parse error on theme Education Pro functions.php
- This topic has 4 replies, 3 voices, and was last updated 7 years, 10 months ago by bviva.
-
AuthorPosts
-
June 13, 2016 at 7:41 pm #187499bvivaMember
Hello -
I was trying to add a "Back" button function and failed, and ended up getting a parse error "Parse error: syntax error, unexpected '<' in /home4/aktender/public_html/AITA/wp-content/themes/education-pro/functions.php on line 179". I deleted the script I was trying to add at the bottom of the functions.php file for education pro - and am left with an error. There are not 179 lines in that file - so not sure where the error message is pointing me. Can a php expert point me to where the error is? I am greatly appreciative of your help.
<?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 = '[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;
}
http://alaskatenders.org/AITA/June 13, 2016 at 8:30 pm #187500Victor FontModeratorPosting the entire functions file into your message isn't going to help. Please copy your functions.php into gist and provide a link.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?June 13, 2016 at 8:37 pm #187501bvivaMemberThanks for your response - what is "gist" ??
June 13, 2016 at 10:07 pm #187504Genesis DeveloperMemberTry pastebin.com and share the link. Then we can easily review the code and help you.
June 14, 2016 at 9:43 am #187530bvivaMemberHi Victor & Chinmoy -
I went into the c-panel to copy the functions.php file under the theme folder and discovered that the erroneous code was still in the file (even tho I thought I had deleted it in the word-press interface) and therefore was causing the error. I deleted that coding and voila it fixed my broken site!! An excellent lesson for me in the mysterious word-press world.
Thank you both very much for your responses.
bviva
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.