Parse Error Syntax Error Unexpected T_endif
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have syntax error unexpected 'endif' (t_endif) laravel Meta Discuss the workings and policies of this site About Us unexpected endif c++ Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with
Parse Error Syntax Error Unexpected 'endif' (t_endif) Wordpress
us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers,
Short_open_tag
just like you, helping each other. Join them; it only takes a minute: Sign up Parse error: syntax error, unexpected 'endif' (T_ENDIF) in WordPress theme up vote 0 down vote favorite This bit of code is for displaying related posts and resides in my includes folder. I have recently switched from a local development environment on php endif a Mac (using MAMP) to using Windows with WAMP. Suddenly this error is occurring in this block of code. It did not occur on my local Mac environment, nor does it occur when testing live. Parse error: syntax error, unexpected 'endif' (T_ENDIF) The error specifically points to the second to last endif. If I remove it the same error is thrown pointing to the last endif in the code. Any ideas? I tried removing both of the specified endif; statements and it throws the following error instead: Parse error: syntax error, unexpected end of file ID); ?> term_id; $args=array( 'tag__in' => $tag_ids, 'post__not_in' => array($post->ID), 'posts_per_page'=>3, // Number of related posts to display. 'caller_get_posts'=>1 , 'post_type' => array( 'post', 'featured-wedding' ) ); $my_query = new wp_query( $args ); ?> have_posts()): ?>
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta
Unexpected End Of File
Discuss the workings and policies of this site About Us Learn more php if about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack netbeans Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping http://stackoverflow.com/questions/20153295/parse-error-syntax-error-unexpected-endif-t-endif-in-wordpress-theme each other. Join them; it only takes a minute: Sign up PHP Parse error: syntax error, unexpected 'endif' (T_ENDIF) [closed] up vote -1 down vote favorite I think Iam getting blind... I really dont find the syntax error in my code
http://stackoverflow.com/questions/25434885/php-parse-error-syntax-error-unexpected-endif-t-endif ?> Where is my mistake?! best regards php wordpress syntax-error share|improve this question asked Aug 21 '14 at 19:57 Thomas 66112 closed as off-topic by nickb, showdev, Fred -ii-, mario, Machavity Aug 21 '14 at 20:05 This question appears to be off-topic. The users who voted to close gave this specific reason:"This question was caused by a problem that can no longer be reproduced or a simple typographical error. While similar questions may be on-topic here, this one was resolved in a manner unlikely to help future readers. This can often be avoided by identifying and closely inspecting the shortest program necessary to reproduce the problem before posting." – nickb, showdev, Fred -ii-, mario, MachavityIf this question can be reworded to fit the rules in the help center, please edit the question. 4 –Fred -ii- Aug 21 '14 at 19:58 add a comment| 1 Answer 1 active oldest votes up vote 3 down vote There must be a colon instead of a semicolon...
Troubleshooting » Parse error: syntax error, unexpected 'endif' (T_ENDIF) in /home/soychu1/soyeonc Parse error: syntax error, unexpected 'endif' (T_ENDIF) in /home/soychu1/soyeonc soyeon_chung @soyeon_chung 11 months, 2 weeks ago I am getting that message. please help!! https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-endif-t_endif-in-homesoychu1soyeonc/ I am a mac user. I was trying to paste some code into functions.php to create custom menu bar. and deleted the code I just pasted and updated file but not working and keep getting that message. Viewing 8 replies - 1 through 8 (of 8 total) Moderator Matthew @kidsguide 11 months, 2 weeks ago Where did you paste the code? You need to syntax error access your FTP and remove the code from the file. soyeon_chung @soyeon_chung 11 months, 2 weeks ago hi! thanks for your answer!!!! I added this: function register_my_menus() { register_nav_menus( array( ‘new-menu' => __( ‘New Menu' ), ‘another-menu' => __( ‘Another Menu' ), ‘an-extra-menu' => __( ‘An Extra Menu' ) ) ); } add_action( ‘init', ‘register_my_menus' ); I believe i deleted it right away but syntax error unexpected didnt work. so I opened my cyber duck. and I have to find "functions.php" file??? Moderator Matthew @kidsguide 11 months, 2 weeks ago Assuming you added it to your themes function.php, then go to public_html>wp-content>themes>thethemethatyouaddedthecodeto there you should find the function.php file. Edit it and remove the code that you added. soyeon_chung @soyeon_chung 11 months, 2 weeks ago so download php file and edit it. and upload the new one?! I just did it but doesn't seem working.T.T Thank you so much btw… Ryan Phillips @ryanphillips 11 months, 2 weeks ago Hey @soyeon_chung! Yes, after making the changes/removing the code you added from your functions.php file, you will need to upload the new one and remove the old one from your theme directory. If that doesn't resolve the error, perhaps something else is causing the problem. Do you have URL where I can see the issue? Thanks! soyeon_chung @soyeon_chung 11 months, 2 weeks ago hi Thank you Ryan! this is link still not working.. http://soyeonchung.net/ soyeon_chung @soyeon_chung 11 months, 2 weeks ago ohhhh it's working fine now! I moved endif; to the out of } and working fine now! Thanks muc