Hey, I just started using WordPress - I’m a complete newbie, and am super perplexed by this error I’m getting in functions.php. I’m hoping I am just making a simple mistake, but I’d really appreciate some suggestions as to what the issue is.
The error:
Parse error: syntax error, unexpected T_VARIABLE in /homepages/33/d123623052/htdocs/rap3/wp-content/themes/business-turnkey/functions.php on line 196
That line would be at the very bottom of my code. From what I can tell, this error occurs when the code is missing a punctuation mark like a [ ( { , ’ etc. I’ve been looking over the code for ages, and from what I can see all the brackets have a matching end, there’s no out of place punctuation.
[php]<?php
define(‘THEME_URI’, get_stylesheet_directory_uri());
define(‘THEME_IMAGES’, THEME_URI . ‘/assets/img’);
define(‘THEME_CSS’, THEME_URI . ‘/assets/css’);
define(‘THEME_JS’, THEME_URI . ‘/assets/js’);
define(‘THEME_TEMPLATES’, THEME_URI . ‘/assets/templates’);
$GLOBALS[‘content_width’] = 900;
/* Define Theme Defaults */
$options = get_option(‘turnkey_theme_options’);
if($options[‘templatestyle’] == null)
$options[‘templatestyle’] = ‘modern’;
if($options[‘typography’] == null)
$options[‘typography’] = ‘typography1’;
function turnkeySlider() {
$options = get_option('turnkey_theme_options');
if($options['sliderTimer'] != null)
$rotateTimer = $options['sliderTimer'];
else
$rotateTimer = 5000;
?>
<script type="text/javascript" charset="utf-8">
jQuery(document).ready(function($) {
$('.slide-container').cycle({ fx: 'scrollHorz',next: '#slide-nav .next',prev: '#slide-nav .prev',pause: 1, timeout:<?php echo $rotateTimer; ?>});
});
</script>
<?php
}
add_action('wp_head', 'turnkeySlider');
require_once ( get_stylesheet_directory() . '/theme-options.php' );
require_once ( 'slider/turnkey-slider.php' );
if (function_exists('register_sidebar')) {
register_sidebar(array(
'name'=> 'Homepage Widgets',
'id' => 'homepage_widgets',
'before_widget' => '', 'after_title' => '
' )); register_sidebar(array( 'name'=> 'Sidebar 1', 'id' => 'sidebar_1', 'before_widget' => '', 'after_title' => '
' )); register_sidebar(array( 'name'=> 'Sidebar 2', 'id' => 'sidebar_2', 'before_widget' => '', 'after_title' => '
' )); register_sidebar(array( 'name'=> 'Footer Widgets', 'id' => 'footer-widgets', 'before_widget' => '', 'after_title' => '
' )); } if ( function_exists( 'register_nav_menus' ) ) { register_nav_menus( array( 'turnkey_mainnav' => 'TurnKey Main Navigation', 'turnkey_secondary' => 'TurnKey Secondary Navigation' ) ); }; add_theme_support( 'post-thumbnails' ); // Makes Sure thumbnails show up in RSS function do_post_thumbnail_feeds($content) { global $post; if(has_post_thumbnail($post->ID)) { $content = '', 'after_title' => '
' )); } // Add Automatic Feed Links add_theme_support('automatic-feed-links'); add_filter('widget_text', 'do_shortcode'); add_action('widgets_init', 'rap_register_sidebars'); // Below added by Jessica 6/24/13 to display Salesforce lookup fields on Gravity Forms field mapping page add_filter('gf_salesforce_skip_reference_types', '__return_false'); // Below added by Jessica to change the field value on the Join Us and Training forms add_action("gform_pre_submission_1", "pre_submission_JoinUs"); add_action("gform_pre_submission_8", "pre_submission_Training"); add_action("gform_pre_submission_15", "pre_submission_HCAP"); function pre_submission_JoinUs($form){ if ($_POST["input_15"] == 'Former Retail Worker') $_POST["input_15"] = 'Retail Worker'; } function pre_submission_Training($form){ if ($_POST["input_18"] == 'Former Retail Worker') $_POST["input_18"] = 'Retail Worker'; } function pre_submission_HCAP($form){ if ($_POST["input_15"] == 'Former Retail Worker') $_POST["input_15"] = 'Retail Worker'; } ?>[/php]