Error code shut down my site…HELP ME PLEASE!!!
-
Hello,
I am doing a site for a non-profit and was looking at your code on your website. Everything was going great until I copied the code from this page http://presscustomizr.com/snippet/adding-logo-footer-credits/
I pasted it on my child’s theme php page and hit update then went to my site to see what happened and this appeared
Parse error: syntax error, unexpected ’11’ (T_LNUMBER) in /home/cchess/public_html/thebigmoss.org/wp-content/themes/customizir_child/functions.php on line 23
Now I can’t even get into my site! Please help me!the site is http://www.thebigmoss.org
-
Hi,
Can you show what your child theme’s functions.php contains?Hi-
I’m having a similar problem. I tried updating a plugin and then an error code came up and now I can’t access my site at all. It just keeps coming up with the same error :
Parse error: syntax error, unexpected ‘!’ in /home/notetoed/public_html/wp-content/plugins/p3/p3.php on line 181
Any ideas how to fix this?
the site is: http://www.notetoeditors.co.uk
Hi,,
I’m also having the same problem. I uploaded new theme called eventerra and suddenly the site goes like this “Parse error: syntax error, unexpected ‘;’ in /home/myaisorg/public_html/pacis2017/wp-content/themes/eventerra/functions/custom-javascript.php on line 45”
Now, I even cant enter my admin site now.. how to fix it?
this is my site link: http://pacis2017.my-ais.org/
@kayseago:
Did you fix it in the last 20 minutes? There is no parse error on your site.
*ups* Wrong theme … we are talking about cutomizr here. You will have to look for the right forum.@lydiatasha:
Same to you … look for the right theme-forum.@rengeiw all fixed now! Not sure what happened but it seemed to resolve itself 🙂
Nothing better than self-resolving problems … ;o)
Menaka S. thank you for your quick response. I was doing a travel day yesterday and didn’t see this until now. Thank you.
So I can not get to the child’s theme php.function through the site but in the C Panel I can(please look at bottom of all my writing). I put the code in from your site to add a widget before the feature images on the home page…which all worked out great. It wasn’t until I added the new code that I copied above (the link) and went to look at the site that the error appeared.
I have never touched the php function because I have always been terrified of it and breaking the site, which looks like I did.
I also found this link on you tube that I think could help https://www.youtube.com/watch?v=434sUQbBum8&list=TLuJ4UpHDyyQQ but I’m nervous about doing it because I haven’t ever done anything like this.<?php
/* Write your awesome functions below *//****** CODE TO PUT WIDGET BEFORE FEATURE IMAGE ON HOMEPAGE */
add_filter( ‘tc_default_widgets’ , ‘add_featured_page_widget’ );
function add_featured_page_widget( $defaults ) {
$defaults[‘fp_widgets’] = array(
‘name’ => __( ‘Featured Pages Widget’ , ‘customizr’ ),
‘description’ => __( ‘Above the featured pages area on home’ , ‘customizr’ )
);
return $defaults;
}add_action(‘__before_fp’ , ‘display_my_fp_widget’);
function display_my_fp_widget() {
dynamic_sidebar(‘fp_widgets’);
}/****** END OF CODE FOR WIDGET */
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
add_filter( ‘tc_credits_display’, ‘my_credits_display’ );
function my_credits_display($html) {
$logo_src = esc_attr ( tc__f( ‘__get_option’ , ‘tc_logo_upload’) ) ;
if ( empty($logo_src) )
return $html;
if ( is_numeric($logo_src) ) {
$_attachment_data = wp_get_attachment_image_src( $logo_src , ‘large’ );
$logo_src = $_attachment_data[0];
}
?>
<div class=”span4 credits”>
<?php
$credits = sprintf( ‘<p> · © %1$s %4$s · Designed by %5$s ·</p>’,
esc_attr( date( ‘Y’ ) ),
esc_url( home_url() ),
esc_attr(get_bloginfo()),
‘<img src=”‘.$logo_src.'” alt=”‘.esc_attr(get_bloginfo()).'”>’,
‘Press Customizr‘
);
echo $credits;
?>
</div>
<?phpadd_action(‘__before_fp’ , ‘display_my_fp_widget’);
function display_my_fp_widget() {
dynamic_sidebar(‘fp_widgets’);
}/****** END OF CODE FOR WIDGET */
There is something mixed up …
The last 5 lines
add_action(‘__before_fp’ , ‘display_my_fp_widget’);
function display_my_fp_widget() {
dynamic_sidebar(‘fp_widgets’);
}
/****** END OF CODE FOR WIDGET */should be deleted I think. They are a copy of the function above (FP-Widget).
It should end with
<?php
}here.
Yes you are right, that was my mistake when pasting it. This is the code
<?php
/* Write your awesome functions below *//****** CODE TO PUT WIDGET BEFORE FEATURE IMAGE ON HOMEPAGE */
add_filter( ‘tc_default_widgets’ , ‘add_featured_page_widget’ );
function add_featured_page_widget( $defaults ) {
$defaults[‘fp_widgets’] = array(
‘name’ => __( ‘Featured Pages Widget’ , ‘customizr’ ),
‘description’ => __( ‘Above the featured pages area on home’ , ‘customizr’ )
);
return $defaults;
}add_action(‘__before_fp’ , ‘display_my_fp_widget’);
function display_my_fp_widget() {
dynamic_sidebar(‘fp_widgets’);
}/****** END OF CODE FOR WIDGET */
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
add_filter( ‘tc_credits_display’, ‘my_credits_display’ );
function my_credits_display($html) {
$logo_src = esc_attr ( tc__f( ‘__get_option’ , ‘tc_logo_upload’) ) ;
if ( empty($logo_src) )
return $html;
if ( is_numeric($logo_src) ) {
$_attachment_data = wp_get_attachment_image_src( $logo_src , ‘large’ );
$logo_src = $_attachment_data[0];
}
?>
<div class=”span4 credits”>
<?php
$credits = sprintf( ‘<p> · © %1$s %4$s · Designed by %5$s ·</p>’,
esc_attr( date( ‘Y’ ) ),
esc_url( home_url() ),
esc_attr(get_bloginfo()),
‘<img src=”‘.$logo_src.'” alt=”‘.esc_attr(get_bloginfo()).'”>’,
‘Press Customizr‘
);
echo $credits;
?>
</div>
<?php
}——————–
I just went in and deleted the whole php code and saved it so the site is back. I did something to the main code and since I do not know what that looks like I couldn’t fix it. I’ll just start over.
ThanksPS thank you rengeiw, your last comment allowed me to think about the code and fix it
Hi,
So have you fixed the issue?
I hope the line numbers that appear here from 10 to 24 is just a paste issue here and are not numbers present in the file.
The topic ‘Error code shut down my site…HELP ME PLEASE!!!’ is closed to new replies.
