• Resolved NoahMason23

    (@noahmason23)


    Let me begin by saying im new to this and am relying heavily on my graphic design background.

    I recently added a bunch of widgetized areas to a customers page and all was working flawlessly. I saw some code on a forum a couple days ago claiming to be a fat footer with 3 widgetized areas side by side. So i Went into my themefunctions php file and pasted the code as i had for others. It was a different code but the same sort of register sidebar array stuff (pleaaaase excuse my lack of tech vernacular). I then put the small pieces of code in my main index php file to place where i wanted the widgets to go. again, No problem. Aside from not being side by side, they showed up in my widgets panel in the dashboard exactly how i named them. once i tried them i saw they werent side to side so i went to my themefunctions php and removed the bit of code to register the new widgets. I hit update file, and all it says is “Parse error: syntax error, unexpected $end in /home/lightsoutfestival/lightsoutfestival.com/wp-content/themes/zenon-lite/functions.php on line 473”

    WHATS WRONG WITH IT!!! Ive tried everything, without trying much because im scared to edit it too much. Please help me. I cant sleep till this is fixed.

    Here is what i have now…

    //SIDEBAR
    function znn_widgets_init(){
    	register_sidebar(array(
    	'name'          => __('Right Sidebar', 'zenon'),
    	'id'            => 'sidebar',
    	'description'   => __('Right Sidebar', 'zenon'),
    	'before_widget' => '<li id="%1$s" class="widget %2$s"><div class="widget_top"></div><div class="widget_wrap">',
    	'after_widget'  => '</div><div class="widget_bottom"></div>',
    	'before_title'  => '<h3 class="widgettitle">',
    	'after_title'   => '</h3>'
    	));
    
    	register_sidebar(array(
    	'name'          => __('Footer Widgets', 'zenon'),
    	'id'            => 'foot_sidebar',
    	'description'   => __('Widget Area for the Footer', 'zenon'),
    	'before_widget' => '<li id="%1$s" class="widget %2$s"><div class="widget_wrap">',
    	'after_widget'  => '</div>',
    	'before_title'  => '<h3 class="widgettitle">',
    	'after_title'   => '</h3>'
    	));
    register_sidebars( 1,
    	array(
    		'name' => 'widgetized-page-top',
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
            'after_widget' => '</div>',
            'before_title' => '<h2 class="widgettitle">',
            'after_title' => '</h2>'
    	)
    );
    register_sidebars( 1,
    	array(
    		'name' => 'widgetized-page-bottom',
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
            'after_widget' => '</div>',
            'before_title' => '<h2 class="widgettitle">',
            'after_title' => '</h2>'
    	)
    );
    register_sidebars( 1,
    	array(
    		'name' => 'widgetized-header-middle',
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
            'after_widget' => '</div>',
            'before_title' => '<h2 class="widgettitle">',
            'after_title' => '</h2>'
    	)
    );
    register_sidebars( 1,
    	array(
    		'name' => 'widgetized-under-slider',
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
            'after_widget' => '</div>',
            'before_title' => '<h2 class="widgettitle">',
            'after_title' => '</h2>'
    	)
    );
    register_sidebars( 1,
    	array(
    		'name' => 'widgetized-under-blocks',
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
            'after_widget' => '</div>',
            'before_title' => '<h2 class="widgettitle">',
            'after_title' => '</h2>'
    	)
    );
    register_sidebars( 1,
    	array(
    		'name' => 'widgetized-under-posts',
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
            'after_widget' => '</div>',
            'before_title' => '<h2 class="widgettitle">',
            'after_title' => '</h2>'
    	)
    );
    register_sidebars( 1,
    	array(
    		'name' => 'widgetized-over-footer',
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
            'after_widget' => '</div>',
            'before_title' => '<h2 class="widgettitle">',
            'after_title' => '</h2>'
    	)
    );
    register_sidebars( 1,
    	array(
    		'name' => 'widgetized-over-feed',
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
            'after_widget' => '</div>',
            'before_title' => '<h2 class="widgettitle">',
            'after_title' => '</h2>'
    	)
    );
    
    add_action( 'widgets_init', 'znn_widgets_init' );

    Here is what I pasted in between the “);” and the “add_action( ‘widgets_init’, ‘znn_widgets_init’ );” which has since been taken out… REMEMBER it has not worked since i took it out, it did work once it was there.

    if ( function_exists('register_sidebar') )
    register_sidebar(array(
    'name' => 'Middle Widgets Left',
    'before_widget' => '<li class="widget %2$s" id="%1$s">',
    'after_widget' => '</li>',
    'before_title' => '<h3>',
    'after_title' => '</h3>'
    ));
    
    if ( function_exists('register_sidebar') )
    register_sidebar(array(
    'name' => 'Middle Widgets Middle',
    'before_widget' => '<li class="widget %2$s" id="%1$s">',
    'after_widget' => '</li>',
    'before_title' => '<h3>',
    'after_title' => '</h3>'
    ));
    
    if ( function_exists('register_sidebar') )
    register_sidebar(array(
    'name' => 'Middle Widgets Right',
    'before_widget' => '<li class="widget %2$s" id="%1$s">',
    'after_widget' => '</li>',
    'before_title' => '<h3>',
    'after_title' => '</h3>'
    ));
    
    function my_widgetized_footer() { ?>
    <div id="footer-widget-block">
    	<div class="my-footer-one footer-widgets sidebar">
    		<ul class="sidebar_list">
    			<?php thesis_default_widget(3); ?>
    		</ul>
    	</div>
    
    	<div class="my-footer-two footer-widgets sidebar">
    		<ul class="sidebar_list">
    			<?php thesis_default_widget(4); ?>
    		</ul>
    	</div>
    
    	<div class="my-footer-three footer-widgets sidebar">
    		<ul class="sidebar_list">
    			<?php thesis_default_widget(5); ?>
    		</ul>
    	</div>
    </div>
    			<?php

    Did i Just delete something by accident or am i completely screwed.

    Once again Im sorry for lack of technical speak… I am however not an idiot and learn quickly, please tell me this is simple πŸ™

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter NoahMason23

    (@noahmason23)

    Is it because I didnt delete the code from the Main Index php file before deleting the widget code in the theme functions php?

    Thread Starter NoahMason23

    (@noahmason23)

    Also, I didnt know about paste bin, if i have posted too much code please just tell me and I will gladly use pastebin instead.

    You probably deleted something by accident. Looking at the last code, at the very end <?php that was the beginning of another php call, and it wasn’t belong to the code you have deleted. Add that back and see how it goes.

    paste your whole functions.php here

    Thread Starter NoahMason23

    (@noahmason23)

    Thanks so much for responding already. just having someone to speak to makes me feel better.

    Here is the whole functions.php file

    http://pastebin.com/hPsmgNR7

    You probably deleted something by accident. Looking at the last code, at the very end <?php that was the beginning of another php call, and it wasn’t belong to the code you have deleted. Add that back and see how it goes.

    In response to this – The second paste is what I added. If there is an error in that code it is because the website im getting it from is wrong, but in any case- it worked the first time… I have now tried adding the code the same way as i did the first time and naming the widgets what i did originally with no luck

    The pastebin link above is how it looks now. It wont even let me update the file… Im hoping once i get the right code in it will let me update and thats how Ill know im fine. right now even when I hit update file it gives me the same Parse error: syntax error, unexpected $end in /home/lightsoutfestival/lightsoutfestival.com/wp-content/themes/zenon-lite/functions.php on line 473 error.

    Okay, then you need to delete that code at the end of what you have pasted. It makes no sense that php there
    <?php
    Only leave the curly brackets which is what closes the function “function my_widgetized_footer()”
    }

    Thread Starter NoahMason23

    (@noahmason23)

    http://pastebin.com/R75tHrGR

    This is what I have now… ( just sidebar part of code, if u want the whole file, no problem) Still Nothing. Same Parse error syntax error.

    any other ideas? lol

    by the way, thanks so much for taking the time i seriously appreciate it.

    Thread Starter NoahMason23

    (@noahmason23)

    As it stands now It wont let me update the functions file, or navigate off that page. I dont know what to do any link i click it says the same parse error. Im affraid to close the browser!

    Remove what you have pasted so you should have this:

    //SIDEBAR
    function znn_widgets_init(){
    	register_sidebar(array(
    	'name'          => __('Right Sidebar', 'zenon'),
    	'id'            => 'sidebar',
    	'description'   => __('Right Sidebar', 'zenon'),
    	'before_widget' => '<li id="%1$s" class="widget %2$s"><div class="widget_top"></div><div class="widget_wrap">',
    	'after_widget'  => '</div><div class="widget_bottom"></div>',
    	'before_title'  => '<h3 class="widgettitle">',
    	'after_title'   => '</h3>'
    	));
    
    	register_sidebar(array(
    	'name'          => __('Footer Widgets', 'zenon'),
    	'id'            => 'foot_sidebar',
    	'description'   => __('Widget Area for the Footer', 'zenon'),
    	'before_widget' => '<li id="%1$s" class="widget %2$s"><div class="widget_wrap">',
    	'after_widget'  => '</div>',
    	'before_title'  => '<h3 class="widgettitle">',
    	'after_title'   => '</h3>'
    	));
    register_sidebars( 1,
    	array(
    		'name' => 'widgetized-page-top',
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
            'after_widget' => '</div>',
            'before_title' => '<h2 class="widgettitle">',
            'after_title' => '</h2>'
    	)
    );
    register_sidebars( 1,
    	array(
    		'name' => 'widgetized-page-bottom',
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
            'after_widget' => '</div>',
            'before_title' => '<h2 class="widgettitle">',
            'after_title' => '</h2>'
    	)
    );
    register_sidebars( 1,
    	array(
    		'name' => 'widgetized-header-middle',
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
            'after_widget' => '</div>',
            'before_title' => '<h2 class="widgettitle">',
            'after_title' => '</h2>'
    	)
    );
    register_sidebars( 1,
    	array(
    		'name' => 'widgetized-under-slider',
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
            'after_widget' => '</div>',
            'before_title' => '<h2 class="widgettitle">',
            'after_title' => '</h2>'
    	)
    );
    register_sidebars( 1,
    	array(
    		'name' => 'widgetized-under-blocks',
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
            'after_widget' => '</div>',
            'before_title' => '<h2 class="widgettitle">',
            'after_title' => '</h2>'
    	)
    );
    register_sidebars( 1,
    	array(
    		'name' => 'widgetized-under-posts',
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
            'after_widget' => '</div>',
            'before_title' => '<h2 class="widgettitle">',
            'after_title' => '</h2>'
    	)
    );
    register_sidebars( 1,
    	array(
    		'name' => 'widgetized-over-footer',
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
            'after_widget' => '</div>',
            'before_title' => '<h2 class="widgettitle">',
            'after_title' => '</h2>'
    	)
    );
    register_sidebars( 1,
    	array(
    		'name' => 'widgetized-over-feed',
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
            'after_widget' => '</div>',
            'before_title' => '<h2 class="widgettitle">',
            'after_title' => '</h2>'
    	)
    );
    	}
    add_action( 'widgets_init', 'znn_widgets_init' );
    Thread Starter NoahMason23

    (@noahmason23)

    http://pastebin.com/p9yQPjS6

    This is what I have there now, still same exact error. What you pasted looks perfectly fine. thats how it was before… Im thinking maybe its because the Main Index php (where I put code to call the widgets into place, and it worked fine) still has that code in the file?

    I cant go to it to change it though because its giving me this error when I try to navigate off… Should I Paste my entire themefunctions php file into a txt document and log out of wordpress? I already tried going to lightsoutfestival.com/wp-admin and it just gives me the same parse error syntax error. The only thing keeping my hope alive is that I can hit BACK on the browser and I can see my wordpress editor open with my themefunctions php file.

    Is it possible nothing I do to the code here will fix it? because the error is not allowing the update file button to do anything??

    I need to get my clients website back. πŸ™

    Im such a n00b.

    If the error message is still the same “Parse error: syntax error, unexpected $end in /home/lightsoutfestival/lightsoutfestival.com/wp-content/themes/zenon-lite/functions.php on line 473
    Then the update is not taking effect to the functions.php
    You will need to use an FTP software.

    BTW, I just checked http://pastebin.com/p9yQPjS6 and that seems to be fine now. Again, you’ll need to update it using an FTP.

    Thread Starter NoahMason23

    (@noahmason23)

    FIXED!!!

    The code was perfect, but even after i replaced it completely i had the same issue… I took the index php and removed the code calling the widgets that no longer existed in the functions php. renamed the old one, called the new one index.php, and voila

    My computer will not die tonight! thanks so much for the quick help again i really appreciate it

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘PLEASE HELP! Parse error: syntax error, unexpected $end …’ is closed to new replies.