Please Help — Parse error: syntax error, unexpected '?' in….
-
Ok, to start… I am somewhat computer savvy, but not good with code etc.
So, in order to get a better speed score on my site, I found directions on how to Remove Query strings from Static Resources by entering this string of code into my theme’s function file (Appearance > Editor > Functions.php.Code is :
function _remove_script_version( $src ){
$parts = explode( ‘?ver’, $src );
return $parts[0];
}
add_filter( ‘script_loader_src’, ‘_remove_script_version’, 15, 1 );
add_filter( ‘style_loader_src’, ‘_remove_script_version’, 15, 1 );After I inserted that and clicked update, my website ‘broke’… just keep getting a message:
Parse error: syntax error, unexpected ‘?’ in /home/d4niel/artwork-photography.com/wp-content/themes/krisztian/functions.php on line 22
So I erased the code, but I still get the same error even though basically undid my paste so… nothing should be different.
Here is the code now:
<?php
if ( function_exists(‘register_sidebar’) ){// This theme uses wp_nav_menu() in 2 locations.
add_action( ‘init’, ‘register_my_menus’ );
function register_my_menus() {
register_nav_menus(
array(
‘menu-1’ => __( ‘Menu 1’ )
)
);
}}
?>And my website is :
artwork-photography.com/Please help
The topic ‘Please Help — Parse error: syntax error, unexpected '?' in….’ is closed to new replies.