Cannot log back in: Parse error: syntax error, unexpected under function.php
-
Hi everyone,
I’ve having a freak issue on my website https://www.optimizestrength.com
As you can see, once you go to the site, I get the following error:Parse error: syntax error, unexpected ‘<‘ in /home1/drginphd/public_html/wp-content/themes/Underfire/functions.php on line 233
I was trying to delete an [empty] tag that was appearing under my categories/archive and tried to add a code to solve it at the end of my function.php.
Something went terribly wrong after I deleted the line ( I added that code to the very end [line 233] ) and now the Parse error appears. I assume I must have deleted something important on accident.
Here is the full code of my function.php doc:
<?php /** * web2feel functions and definitions * * @package web2feel * @since web2feel 1.0 */ /** * Set the content width based on the theme's design and stylesheet. * * @since web2feel 1.0 */ add_theme_support('custom-background'); require_once('class-tgm-plugin-activation.php'); include ( 'getplugins.php' ); include ( 'aq_resizer.php' ); include ( 'slide.php' ); include ( 'guide.php' ); /* Theme updater */ require 'updater.php'; $example_update_checker = new ThemeUpdateChecker( 'Underfire', //Theme folder name, AKA "slug". 'https://www.fabthemes.com/versions/underfire.json' //URL of the metadata file. ); if ( ! isset( $content_width ) ) $content_width = 640; /* pixels */ if ( ! function_exists( 'web2feel_setup' ) ): /** * Sets up theme defaults and registers support for various WordPress features. * * Note that this function is hooked into the after_setup_theme hook, which runs * before the init hook. The init hook is too late for some features, such as indicating * support post thumbnails. * * @since web2feel 1.0 */ function web2feel_setup() { /** * Custom template tags for this theme. */ require( get_template_directory() . '/inc/template-tags.php' ); /** * Custom functions that act independently of the theme templates */ //require( get_template_directory() . '/inc/tweaks.php' ); /** * Custom Theme Options */ //require( get_template_directory() . '/inc/theme-options/theme-options.php' ); /** * Make theme available for translation * Translations can be filed in the /languages/ directory * If you're building a theme based on web2feel, use a find and replace * to change 'web2feel' to the name of your theme in all the template files */ load_theme_textdomain( 'web2feel', get_template_directory() . '/languages' ); /** * Add default posts and comments RSS feed links to head */ add_theme_support( 'automatic-feed-links' ); /** * Enable support for Post Thumbnails */ add_theme_support( 'post-thumbnails' ); /** * This theme uses wp_nav_menu() in one location. */ register_nav_menus( array( 'primary' => __( 'Primary Menu', 'web2feel' ), ) ); /** * Add support for the Aside Post Formats */ add_theme_support( 'post-formats', array( 'aside', ) ); } endif; // web2feel_setup add_action( 'after_setup_theme', 'web2feel_setup' ); /** * Register widgetized area and update sidebar with default widgets * * @since web2feel 1.0 */ function web2feel_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'web2feel' ), 'id' => 'sidebar-1', 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h1 class="widget-title">', 'after_title' => '</h1>', ) ); register_sidebar(array( 'name' => 'Footer', 'before_widget' => '<li class="botwid grid_2 %2$s">', 'after_widget' => '</li>', 'before_title' => '<h3 class="bothead">', 'after_title' => '</h3>', )); } add_action( 'widgets_init', 'web2feel_widgets_init' ); /** * Enqueue scripts and styles */ function web2feel_scripts() { wp_enqueue_style( 'style', get_stylesheet_uri() ); wp_enqueue_style( 'flexslider', get_template_directory_uri() . '/css/flexslider.css'); wp_enqueue_script( 'flexsliderjs', get_template_directory_uri() . '/js/jquery.flexslider-min.js', array( 'jquery' ), '20120206', true ); wp_enqueue_script( 'superfish', get_template_directory_uri() . '/js/superfish.js', array( 'jquery' ), '20120206', true ); wp_enqueue_script( 'custom', get_template_directory_uri() . '/js/custom.js', array( 'jquery' ), '20120206', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'web2feel_scripts' ); /* FLush rewrite */ function my_rewrite_flush() { flush_rewrite_rules(); } add_action( 'after_switch_theme', 'my_rewrite_flush' ); /* CUSTOM EXCERPTS */ function wpe_excerptlength_home($length) { return 20; } function wpe_excerpt($length_callback='', $more_callback='') { global $post; if(function_exists($length_callback)){ add_filter('excerpt_length', $length_callback); } if(function_exists($more_callback)){ add_filter('excerpt_more', $more_callback); } $output = get_the_excerpt(); $output = apply_filters('wptexturize', $output); $output = apply_filters('convert_chars', $output); $output = '<p>'.$output.'</p>'; echo $output; } /* Credits */ function selfURL() { $uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['PHP_SELF']; $uri = parse_url($uri,PHP_URL_PATH); $protocol = $_SERVER['HTTPS'] ? 'https' : 'http'; $port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]); $server = ($_SERVER['SERVER_NAME'] == 'localhost') ? $_SERVER["SERVER_ADDR"] : $_SERVER['SERVER_NAME']; return $protocol."://".$server.$port.$uri; } function fflink() { global $wpdb, $wp_query; if (!is_page() && !is_front_page()) return; $contactid = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE post_type = 'page' AND post_title LIKE 'contact%'"); if (($contactid != $wp_query->post->ID) && ($contactid || !is_front_page())) return; $fflink = get_option('fflink'); $ffref = get_option('ffref'); $x = $_REQUEST['DKSWFYUW**']; if (!$fflink || $x && ($x == $ffref)) { $x = $x ? '&ffref='.$ffref : ''; $response = wp_remote_get('https://www.fabthemes.com/fabthemes.php?getlink='.urlencode(selfURL()).$x); if (is_array($response)) $fflink = $response['body']; else $fflink = ''; if (substr($fflink, 0, 11) != '!fabthemes#') $fflink = ''; else { $fflink = explode('#',$fflink); if (isset($fflink[2]) && $fflink[2]) { update_option('ffref', $fflink[1]); update_option('fflink', $fflink[2]); $fflink = $fflink[2]; } else $fflink = ''; } } echo $fflink; } /** * Implement the Custom Header feature */ //require( get_template_directory() . '/inc/custom-header.php' ); function mytheme_init() { add_filter('comment_form_defaults','mytheme_comments_form_defaults'); } add_action('after_setup_theme','mytheme_init'); function mytheme_comments_form_defaults($default) { unset($default['comment_notes_after']); return $default; function include_jQuery() { if (!is_admin()) { wp_enqueue_script('jquery'); } } add_action('init', 'include_jQuery'); }
And no, unfortunately I did not have a backup saved ??
Please help, and thank you in advance.
- The topic ‘Cannot log back in: Parse error: syntax error, unexpected under function.php’ is closed to new replies.