functions.php error code
-
I am receiving the following error if i try to navigate anywhere on the dashboard. if i try to log in or go to the site this error show
Parse error: syntax error, unexpected ‘?’ in /home/jbaez/public_html/wp-content/themes/pinboard/functions.php on line 205
i downloaded the pinboard theme in a file for their site and copied and pasted the code from the file back into the functions.php file and uploaded it but still receive the same error.
not sure what is wrong. please help
-
this is the original code web site it darumu.com
[ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]
function pinboard_widgets_init() { $title_tag = pinboard_get_option( 'widget_title_tag' ); register_sidebar( array( 'name' => 'Header', 'description' => 'Displays in the header. Intended exclusively for displaying ads of standard dimentions.', 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside><!-- .widget -->', 'before_title' => '<' . $title_tag . ' class="widget-title">', 'after_title' => '</' . $title_tag . '>' ) ); register_sidebar( array( 'name' => 'Sidebar Top', 'description' => 'Displays in in the main sidebar stacked at the top.', 'before_widget' => '<div class="column onecol"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside><!-- .widget --></div>', 'before_title' => '<' . $title_tag . ' class="widget-title">', 'after_title' => '</' . $title_tag . '>' ) ); register_sidebar( array( 'name' => 'Sidebar Left', 'description' => 'Displays in in the main sidebar floated to the left.', 'before_widget' => '<div class="column onecol"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside><!-- .widget --></div>', 'before_title' => '<' . $title_tag . ' class="widget-title">', 'after_title' => '</' . $title_tag . '>' ) ); register_sidebar( array( 'name' => 'Sidebar Right', 'description' => 'Displays in in the main sidebar floated to the right.', 'before_widget' => '<div class="column onecol"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside><!-- .widget --></div>', 'before_title' => '<' . $title_tag . ' class="widget-title">', 'after_title' => '</' . $title_tag . '>' ) ); register_sidebar( array( 'name' => 'Sidebar Bottom', 'description' => 'Displays in in the main sidebar stacked at the bottom.', 'before_widget' => '<div class="column onecol"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside><!-- .widget --></div>', 'before_title' => '<' . $title_tag . ' class="widget-title">', 'after_title' => '</' . $title_tag . '>' ) ); $columns = pinboard_get_option( 'footer_columns' ); if( 1 == $columns ) $grid_class = 'onecol'; elseif( 2 == $columns ) $grid_class = 'twocol'; elseif( 3 == $columns ) $grid_class = 'threecol'; elseif( 4 == $columns ) $grid_class = 'fourcol'; register_sidebar( array( 'name' => 'Footer', 'description' => 'Displays in in the footer area.', 'before_widget' => '<div class="column ' . $grid_class . '"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside><!-- .widget --></div>', 'before_title' => '<' . $title_tag . ' class="widget-title">', 'after_title' => '</' . $title_tag . '>' ) ); register_sidebar( array( 'name' => '404 Page', 'description' => 'Displays on 404 Pages in the content area.', 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside><!-- .widget -->', 'before_title' => '<' . $title_tag . ' class="widget-title">', 'after_title' => '</' . $title_tag . '>' ) ); register_sidebar( array( 'name' => 'Wide', 'description' => 'Displays on the front page and spans full width.', 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside><!-- .widget -->', 'before_title' => '<' . $title_tag . ' class="widget-title">', 'after_title' => '</' . $title_tag . '>' ) ); $columns = pinboard_get_option( 'boxes_columns' ); if( 1 == $columns ) $grid_class = 'onecol'; elseif( 2 == $columns ) $grid_class = 'twocol'; elseif( 3 == $columns ) $grid_class = 'threecol'; elseif( 4 == $columns ) $grid_class = 'fourcol'; register_sidebar( array( 'name' => 'Boxes', 'before_widget' => '<div class="column ' . $grid_class . '"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside><!-- .widget --></div>', 'before_title' => '<' . $title_tag . ' class="widget-title">', 'after_title' => '</' . $title_tag . '>' ) ); register_sidebar( array( 'name' => 'Footer Wide', 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside><!-- .widget -->', 'before_title' => '<' . $title_tag . ' class="widget-title">', 'after_title' => '</' . $title_tag . '>' ) ); this is the line 205 were its saying the error is } endif;i downloaded the pinboard theme in a file for their site and copied and pasted the code from the file back into the functions.php
Do you have an original unedited copy of
wp-content/themes/pinboard/functions.phpfile? The fastest way to fix that error is to put the original unedited version back via FTP or whatever file management application your host provides.up date-
if i try to upload the new code it automatically goes to the error message will not let me change at all
it wont let me change anything at all. when i paste in the original code and click upload it auto gen the error code.
You don’t want to edit that
functions.phpfile at all just extract the original unedited version from the theme’s ZIP archive and upload that as-is.Once you’re up and running again then consider creating a child theme and place your edits in the child theme’s
functions.phpfile. That way if your Pinboard theme gets updated then you will not lose your changes.
The topic ‘functions.php error code’ is closed to new replies.