Parse error: syntax error, unexpected T_STRING
-
I use WordPress daily, but I’ve run into a new problem (for me). After trying to edit footer content through a Genesis (Version: 2.0.2) custom child theme, I got shut out of the site with only the following error message showing on the screen:
Parse error: syntax error, unexpected T_STRING in /home3/cathig/public_html/wp-content/themes/oxylift/functions.php on line 50
I tried replacing the old functions.php file via cPanel, but the error message remains. To put the site back to business, I changed the name of the child theme directory in order to get access to the WordPress Dashboard. Then I installed a new temporary theme.
So, how can I fix this functions.php file so I can bring back the correct theme without rebuilding the whole thing? Any help would be appreciated! WP version 3.8.1. Thanks!
It currently reads in its entirety:
text/x-generic functions.php
PHP script text<?php
// Start the engine
require_once(TEMPLATEPATH.’/lib/init.php’);// Child theme library
require_once(CHILD_DIR.’/lib/custom-header.php’);// Child theme (do not remove)
define(‘CHILD_THEME_NAME’, ‘Oxylift Custom Theme’);
define(‘CHILD_THEME_URL’, ‘https://www.joycegrace.com’);// Add support for custom background
if ( function_exists(‘add_custom_background’) ) {
add_custom_background();
}// Add new image sizes
add_image_size(‘Dynamic Content Gallery’, 610, 225, TRUE);// Force layout on homepage
add_filter(‘genesis_pre_get_option_site_layout’, ‘corporate_home_layout’);
function corporate_home_layout($opt) {
if ( is_home() )
$opt = ‘content-sidebar’;
return $opt;
}// Replaces homepage sidebar with Sidebar Home in widget area
add_action(‘genesis_after_content’, ‘get_custom_sidebar’, 5);
function get_custom_sidebar() {
if( is_home() ) {
remove_action(‘genesis_after_content’, ‘genesis_get_sidebar’);
get_sidebar(‘home’);
}
}//Customize breadcrumbs
add_filter(‘genesis_breadcrumb_args’, ‘custom_breadcrumb_args’);
function custom_breadcrumb_args($args) {
$args[‘labels’][‘prefix’] = ”;
$args[‘sep’] = ‘: ‘;
return $args;
}add_theme_support( ‘woocommerce’ );
// Customize the footer section
add_filter(‘genesis_footer_creds_text’, ‘corporate_footer_creds_text’);
function corporate_footer_creds_text($creds) {
$creds = __(‘P.O. Box 45103 Surrey, BC V4A 9L1. Join our affiliate program! ~ Refer & Earn! ~ Be an OxyLift Consultant )’;
return $creds;
}add_filter(‘genesis_footer_backtotop_text’, ‘corporate_footer_backtotop_text’);
function corporate_footer_backtotop_text($text) {
$text = __(‘Copyright Oxylift ‘) . date(‘Y’);
return $text;
}// Register widget areas
//<!–Noticable – DMG–>
genesis_register_sidebar(array(
‘name’=>’Noticeable Button’,
‘id’ => ‘noticeable-button’,
‘description’ => ‘This is a button for home page.’,
‘before_title’=>'<h4 class=”widgettitle”>’,’after_title’=>'</h4>’
));
//<!–Noticable – DMG–>
genesis_register_sidebar(array(
‘name’=>’Sidebar Home’,
‘id’ => ‘sidebar-home’,
‘description’ => ‘This is the right sidebar on the homepage.’,
‘before_title’=>'<h4 class=”widgettitle”>’,’after_title’=>'</h4>’
));
genesis_register_sidebar(array(
‘name’=>’Featured Top Left’,
‘id’ => ‘featured-top-left’,
‘description’ => ‘This is the featured top left column of the homepage.’,
‘before_title’=>'<h4 class=”widgettitle”>’,’after_title’=>'</h4>’
));
genesis_register_sidebar(array(
‘name’=>’Featured Top Right’,
‘id’ => ‘featured-top-right’,
‘description’ => ‘This is the featured top right column of the homepage.’,
‘before_title’=>'<h4 class=”widgettitle”>’,’after_title’=>'</h4>’
));
genesis_register_sidebar(array(
‘name’=>’Featured Bottom’,
‘id’ => ‘featured-bottom’,
‘description’ => ‘This is the featured bottom section of the homepage.’,
‘before_title’=>'<h4 class=”widgettitle”>’,’after_title’=>'</h4>’
));function yoast_allow_rel() {
global $allowedtags;
$allowedtags[‘a’][‘rel’] = array ();
}
add_action( ‘wp_loaded’, ‘yoast_allow_rel’ );
?>
- The topic ‘Parse error: syntax error, unexpected T_STRING’ is closed to new replies.