WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] WordPress on local host (11 posts)

  1. jayce103
    Member
    Posted 4 years ago #

    Hi all,

    I am running wordpress on xampp with success, however I copied my online site and database. which works apart from I get the error when I choose the theme I am using.

    Parse error: syntax error, unexpected $end in C:\xampp\htdocs\csg\wp-content\themes\iblog2\header.php on line 67

    Any suggestions??

    The theme is iblog2

    Thanks

    Jayce

  2. magickman5
    Member
    Posted 4 years ago #

    hi jayce103,

    might be problem with the missing braces so check for } or ) before line 67 in header.php file.

  3. jayce103
    Member
    Posted 4 years ago #

    Hi magickman,

    Thanks for that, not sure there is anything missing, its the same file that is online and thats working ok.

    So here is the code just incase it needs to be different on xampp or localhost.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">

    <head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

    <title><?php if(is_home()) { echo bloginfo('name'); } else { wp_title(''); } ?></title>
    <link rel="shortcut icon" href="<?php if (get_option('favicon')):?><?php echo get_option('favicon');?><? else :?><?php bloginfo('stylesheet_directory'); ?>/favicon.ico<? endif;?>" type="image/x-icon" />
    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->

    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="all" />
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/print.css" type="text/css" media="print" />

    <!-- Sidebar docking boxes (dbx) by Brothercake - http://www.brothercake.com/ -->
    <script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/dbx.js"></script>
    <script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/dbx-key.js"></script>

    <link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_directory'); ?>/dbx.css" media="screen, projection" />

    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

    <!--[if lt IE 8]>
    <script src="http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE8.js" type="text/javascript"></script>
    <![endif]-->

    <!--[if IE 6]>
    <script src="<?php bloginfo('stylesheet_directory'); ?>/belatedpng.js"></script>
    <script>
    DD_belatedPNG.fix('.png_bg, img, #sidebar ul li');
    </script>
    <style>
    #header .blogtitle .sheen{display: none;height: 1px;}
    </style>
    <![endif]-->

    <?php wp_head(); ?>
    </head>
    <body>

    <div id="page" class="fix">
    <div id="wrapper" class="fix">
    <div id="header" class="fix">
    <?php if(get_option('custom-header')):?>
    <img class="headerimage" src="<?php echo get_option('custom-header');?>" alt="<?php bloginfo('name'); ?>"/>
    <?php else:?>
    <h1 class="blogtitle">"><div class="sheen"></div><?php bloginfo('name'); ?></h1>
    <div class="description"><?php bloginfo('description'); ?></div>
    <?php endif; ?>
    </div><!-- /header -->

    <div id="nav" class="fix">
    <ul class="fix">
    <li class="page_item ">/" title="Home"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/home-icon-trans.png"/>
    <?php
    $frontpage_id = get_option('page_on_front');
    wp_list_pages('sort_column=menu_order&exclude='.$frontpage_id.'&depth=1&title_li=');?>

    <?php include (TEMPLATEPATH . '/searchform.php'); ?>

    </div><!-- /nav -->

    <div id="container" class="fix">
    <div id="left-col">

  4. jayce103
    Member
    Posted 4 years ago #

    also line 67 is the end line underneath <div id="left-col">

  5. jayce103
    Member
    Posted 4 years ago #

    Anyone??

  6. jayce103
    Member
    Posted 4 years ago #

    I have tried adding a couple of end tags one div and one php but still no luck.

    Is this a dead end job or is it something really simple?

  7. vtxyzzy
    Member
    Posted 4 years ago #

    I would try deleting and reinstalling the theme unless you have modified it.

    If that doesn't help, we need to see the code from header.php. Be sure to put it between backticks.

  8. jayce103
    Member
    Posted 4 years ago #

    Hi vtxyzzy,

    I have reinstalled the theme several times with no luck. I have not modified it to me knowledge, certainly not the php as I am still new at it so don't do that just yet.

    Here is the code again

    '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">

    <head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

    <title><?php if(is_home()) { echo bloginfo('name'); } else { wp_title(''); } ?></title>
    <link rel="shortcut icon" href="<?php if (get_option('favicon')):?><?php echo get_option('favicon');?><? else :?><?php bloginfo('stylesheet_directory'); ?>/favicon.ico<? endif;?>" type="image/x-icon" />
    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->

    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="all" />
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/print.css" type="text/css" media="print" />

    <!-- Sidebar docking boxes (dbx) by Brothercake - http://www.brothercake.com/ -->
    <script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/dbx.js"></script>
    <script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/dbx-key.js"></script>

    <link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_directory'); ?>/dbx.css" media="screen, projection" />

    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

    <!--[if lt IE 8]>
    <script src="http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE8.js" type="text/javascript"></script>
    <![endif]-->

    <!--[if IE 6]>
    <script src="<?php bloginfo('stylesheet_directory'); ?>/belatedpng.js"></script>
    <script>
    DD_belatedPNG.fix('.png_bg, img, #sidebar ul li');
    </script>
    <style>
    #header .blogtitle .sheen{display: none;height: 1px;}
    </style>
    <![endif]-->

    <?php wp_head(); ?>
    </head>
    <body>

    <div id="page" class="fix">
    <div id="wrapper" class="fix">
    <div id="header" class="fix">
    <?php if(get_option('custom-header')):?>
    <img class="headerimage" src="<?php echo get_option('custom-header');?>" alt="<?php bloginfo('name'); ?>"/>
    <?php else:?>
    <h1 class="blogtitle">"><div class="sheen"></div><?php bloginfo('name'); ?></h1>
    <div class="description"><?php bloginfo('description'); ?></div>
    <?php endif; ?>
    </div><!-- /header -->

    <div id="nav" class="fix">
    <ul class="fix">
    <li class="page_item ">/" title="Home"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/home-icon-trans.png"/>
    <?php
    $frontpage_id = get_option('page_on_front');
    wp_list_pages('sort_column=menu_order&exclude='.$frontpage_id.'&depth=1&title_li=');?>

    <?php include (TEMPLATEPATH . '/searchform.php'); ?>

    </div><!-- /nav -->

    <div id="container" class="fix">
    <div id="left-col">
    '

    Thanks guys

  9. vtxyzzy
    Member
    Posted 4 years ago #

    I just installed iblog2 v 2.9.2 on my test site and compared its header.php to the code you posted. There are many differences. If that is the version you have, I suggest you delete the themes/iblog2 folder and reinstall.

  10. jayce103
    Member
    Posted 4 years ago #

    Your absolutely right!

    Strange seeing that I just copied it straight from the online blog source?

    I have now got the new one and installed it, so now working.

    Thank you vtxyzzy for your time.

    Regards,

    Jayce

  11. vtxyzzy
    Member
    Posted 4 years ago #

    You are welcome!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.