0

Im having problem with one theme, im installing theme and trying to open website but when i open is saying like this. ''Parse error: syntax error, unexpected end of file in D:\Programs\xampp\htdocs\wordpress\wp-content\themes\xwp-directory\header.php on line 68 There has been a critical error on your website.

Learn more about debugging in WordPress.''

This is the code

<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <?php 
        $options = get_option( 'threeus_options' );
        $favicon = $options['favicon'] ? $options['favicon'] : get_template_directory_uri() . '/images/assets/favicon.png';
        $header_code     = $options['header_code'];
    ?>
    <link rel="shortcut icon" href="<?php echo $favicon; ?>" />
    <?php wp_head(); ?>
    <?php echo stripslashes($header_code); ?>
</head>

<body <?php body_class(); ?> itemscope itemtype="http://schema.org/WebPage">

    <div id="wrapper" class="hfeed site">

<header id="header" class="site-header header2" role="banner" itemscope itemtype="http://schema.org/WPHeader">
    <div class="container">
        <div class="mid-header clearfix">
            <div class="site-brand">
                <a href="<?php echo site_url(); ?>" class="logo">
                    <?php
                    $options = get_option( 'threeus_options' );
                    $logo_small = $options['logo_small'] ? $options['logo_small'] : get_template_directory_uri() . '/images/assets/logo.png';?>
                    <img src="<?php echo $logo_small; ?>" alt="logo"/>
                </a>                
            </div><!-- .site-brand -->
            <div class="right-header">
                <?php echo get_search_form(); ?>
            </div>
        </div><!-- .mid-header -->
        <nav class="main-menu clearfix" role="navigation" itemscope itemtype="http://schema.org/SiteNavigationElement">
            <span class="mobile-menu"><i class="fa fa-bars"></i></span>
            <?php
            wp_nav_menu(
                array(
                    'theme_location' => 'main_menu',
                    'container'      => false,
                    'menu_id'        => 'menu-main',
                    'menu_class'     => 'menu-main',
                    'fallback_cb'    => '',
                )
            );
            ?>

        </nav><!-- .main-menu -->
        <br>
        <?php
            $options = get_option('threeus_options');
            $aam = stripslashes($options['aam']);
            if ($aam) {
                $substr = substr( $aam, 0, 4 );
                if ($substr == 'http') { ?>
                    <img class="ads" src="<?php echo $aam; ?>">
                <?php } else {
                    echo $aam;
                }
            }
        ?>
    </div><!-- .container -->

</header><!-- .site-header -->
        <main id="main" class="site-main" role="main" itemscope itemprop="mainContentOfPage">


<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <?php 
        $options = get_option( 'threeus_options' );
        $favicon = $options['favicon'] ? $options['favicon'] : get_template_directory_uri() . '/images/assets/favicon.png';
        $header_code     = $options['header_code'];
    ?>
    <link rel="shortcut icon" href="<?php echo $favicon; ?>" />
    <?php wp_head(); ?>
    <?php echo stripslashes($header_code); ?>
</head>

<body <?php body_class(); ?> itemscope itemtype="http://schema.org/WebPage">

    <div id="wrapper" class="hfeed site">

<header id="header" class="site-header header2" role="banner" itemscope itemtype="http://schema.org/WPHeader">
    <div class="container">
        <div class="mid-header clearfix">
            <div class="site-brand">
                <a href="<?php echo site_url(); ?>" class="logo">
                    <?php
                    $options = get_option( 'threeus_options' );
                    $logo_small = $options['logo_small'] ? $options['logo_small'] : get_template_directory_uri() . '/images/assets/logo.png';?>
                    <img src="<?php echo $logo_small; ?>" alt="logo"/>
                </a>                
            </div><!-- .site-brand -->
            <div class="right-header">
                <?php echo get_search_form(); ?>
            </div>
        </div><!-- .mid-header -->
        <nav class="main-menu clearfix" role="navigation" itemscope itemtype="http://schema.org/SiteNavigationElement">
            <span class="mobile-menu"><i class="fa fa-bars"></i></span>
            <?php
            wp_nav_menu(
                array(
                    'theme_location' => 'main_menu',
                    'container'      => false,
                    'menu_id'        => 'menu-main',
                    'menu_class'     => 'menu-main',
                    'fallback_cb'    => '',
                )
            );
            ?>

        </nav><!-- .main-menu -->
        <br>
        <?php
            $options = get_option('threeus_options');
            $aam = stripslashes($options['aam']);
            if ($aam) {
                $substr = substr( $aam, 0, 4 );
                if ($substr == 'http') { ?>
                    <img class="ads" src="<?php echo $aam; ?>">
                <?php } else {
                    echo $aam;
                }
            }
        ?>
    </div><!-- .container -->

</header><!-- .site-header -->
        <main id="main" class="site-main" role="main" itemscope itemprop="mainContentOfPage">
leo61
  • 1
  • Hi Leo, welcome to stack please see https://stackoverflow.com/tour, and https://stackoverflow.com/help/how-to-ask. If you google the error https://www.google.com.au/search?q=Parse+error%3A+syntax+error%2C+unexpected+end+of+file you'll see a number of causes. It's a coding error, possibly an unclosed bracket. Take it up with provider of the theme. – anmari Oct 12 '20 at 02:23
  • @anmari This theme is outdated, it means there is no developer behind this theme to give help. If there is someone who can give help about this , i can upload all theme if someone needs it. I tried options from google searching but didnt help. – leo61 Oct 12 '20 at 23:01

0 Answers0