Syntax Errors .. HELP !!
-
I was trying to edit my functions php file … and it didn’t like what I did.
I tried to put it back to where it was … but now I only get
Parse error: syntax error, unexpected ‘.’ in /home/ixall012/public_html/www.ume-collection.co.uk/wp-content/themes/imbalance/functions.php on line 198
Please can someone help, as now I can’t even go back to functions pho, as that error message seems to flash over my entire site …
I haven’t yet backed up my website … : (
-
you need to give me the code which is in function.php file at line 198
As you told
/home/ixall012/public_html/www.ume-collection.co.uk/wp-content/themes/imbalance/functions.php on line 198
I need to see that code, so that we will get solve it…
I just had exactly the same problem no more than 10 minutes ago!!
Parse error: syntax error, unexpected $end in /home/content/02/8756202/html/wp-content/themes/suffusion/functions.php on line 2151
how do i get back into the function.php file so i can fix this??
thanks for your offer of help …
I cannot revisit the page, as it seems to have effected my whole site.
Should I try to log in to the ‘functions php’ file from my Cpanel website …, as I can’t see it from wordpress ?
OK I edited the last couple of lines, of functions php, however have pasted several of the last lines, so you can see where we are:
I have deleted the content I put in there ( I was trying to remove meta data) but I think I must have moved something.
It says: Parse error: syntax error, unexpected ‘.’ in /home/ixall012/public_html/www.ume-collection.co.uk/wp-content/themes/imbalance/functions.php on line 198″
I can’t see a dot …. also on dreamweaver it is not line 198 but line 506 !!
…. CODE BEGINS
$posted_in = __( ‘Bookmark the permalink.’, ‘twentyten’ );
}
// Prints the string, replacing the placeholders.
printf(
$posted_in,
get_the_category_list( ‘, ‘ ),
$tag_list,
get_permalink(),
the_title_attribute( ‘echo=0’ )
);
}
endif;CODE ENDS …
I think you have customized the “twenty_ten” wordpress theme.
First, you need to replace this code twenty_ten function.php file.
if ( ! function_exists( 'twentyten_posted_in' ) ) : /** * Prints HTML with meta information for the current post (category, tags and permalink). * * @since Twenty Ten 1.0 */ function twentyten_posted_in() { // Retrieves tag list of current post, separated by commas. $tag_list = get_the_tag_list( '', ', ' ); if ( $tag_list ) { $posted_in = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyten' ); } elseif ( is_object_in_taxonomy( get_post_type(), 'category' ) ) { $posted_in = __( 'This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyten' ); } else { $posted_in = __( 'Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyten' ); } // Prints the string, replacing the placeholders. printf( $posted_in, get_the_category_list( ', ' ), $tag_list, get_permalink(), the_title_attribute( 'echo=0' ) ); } endif;Then, It will work, and after that you can change/update that code.
Let me know if you face any problem on the same.
Thank you – I have replaced that code and uploaded again to my WP-Includes file on my Cpanel- but it still does not work.
I’m really scared now, as I can’t see my whole website !
What do you think I am doing wrong please ?Thanks again for your kind help.
the whole last code looks like this:
);
}
endif;if ( ! function_exists( 'twentyten_posted_in' ) ) :
/**
* Prints HTML with meta information for the current post (category, tags and permalink).
*
* @since Twenty Ten 1.0
*/
function twentyten_posted_in() {
// Retrieves tag list of current post, separated by commas.
$tag_list = get_the_tag_list( '', ', ' );
if ( $tag_list ) {
$posted_in = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the permalink.', 'twentyten' );
} elseif ( is_object_in_taxonomy( get_post_type(), 'category' ) ) {
$posted_in = __( 'This entry was posted in %1$s. Bookmark the permalink.', 'twentyten' );
} else {
$posted_in = __( 'Bookmark the permalink.', 'twentyten' );
}
// Prints the string, replacing the placeholders.
printf(
$posted_in,
get_the_category_list( ', ' ),
$tag_list,
get_permalink(),
the_title_attribute( 'echo=0' )
);
}
endif;it is now saying
Parse error: syntax error, unexpected T_FUNCTION in /home/ixall012/public_html/www.ume-collection.co.uk/wp-includes/functions.php on line 489
Wow, are you editing the wp-includes function.php ?????
I think you should not change/update any code from wp-admin and wp-includes folder.
I think we should customize the code of wp-content folder files.
Well, I think you need to replace whole function.php file in your theme folder. (/wp-content/THEME_FOLDER/function.php)
You can download that function.php file from wordpress default theme..
WordPress Twenty Ten Theme: http://ww.wp.xz.cn/extend/themes/twentyten
Thanks I have tried this but it still does not work.
I think I probably was editing the /wp-content/THEME_FOLDER/function.php, but now I seem to have changed the wp-includes function.php.Not sure why I switched, I think it may be due to what the error message was saying.
I have uploaded the one function.php file, that I can download from the Twenty Ten Theme. I uploaded it to both places … is this correct ?
It is now saying Fatal error: Call to undefined function add_action() in /home/ixall012/public_html/www.ume-collection.co.uk/wp-includes/functions.php on line 51
Is my site dead ? : (
…
thanks for your help.
First, Take a backup of wp-content folder.
Download the latest wordpress: http://ww.wp.xz.cn/download/
Replace whole wp-includes folder with the new downloaded worpdress folder (wp-includes) only.
And Dont try to update any code in wp-includes and wp-admin folder…
Thank you I will start again …
The topic ‘Syntax Errors .. HELP !!’ is closed to new replies.