Support » Themes and Templates » Template Problem

  • I am really new to this BUT always eager to learn.

    I have designed my own template and uploaded the theme + styles + images to my themes folder. I successfully selected the theme in my wordpress control panel but then I got the following error:

    Parse error: parse error, unexpected T_ENDWHILE in /home/bionicno/public_html/WordPress/wp-content/themes/bionicnomad-hip/index.php on line 57

    my themes folder structure looks like this:

    – style.css
    – index.php
    – comments.php
    – ./images
    – all my images

    I am not very knowledgable with php and just followed a tutorial on how to make your own theme. I really hope that somebody can help me out here ( or I am going to get gray hair over this…)

    My code in index.php is as follows:

    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “”>
    <html xmlns=”” xml:lang=”en” lang=”en”>
    <head profile=”″>
    <meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″ />
    <title><?php bloginfo(‘name’); ?> <?php if ( is_single() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?></title>

    <meta name=”generator” content=”WordPress <?php bloginfo(‘version’); ?>” /> <!– leave this for stats –>
    <link rel=”stylesheet” href=”<?php bloginfo(‘stylesheet_url’); ?>” type=”text/css” media=”screen” />
    <link rel=”alternate” type=”application/rss+xml” title=”RSS 2.0″ href=”<?php bloginfo(‘rss2_url’); ?>” />
    <link rel=”alternate” type=”text/xml” title=”RSS .92″ href=”<?php bloginfo(‘rss_url’); ?>” />
    <link rel=”alternate” type=”application/atom+xml” title=”Atom 0.3″ href=”<?php bloginfo(‘atom_url’); ?>” />
    <link rel=”pingback” href=”<?php bloginfo(‘pingback_url’); ?>” />

    <?php wp_get_archives(‘type=monthly&format=link’); ?>
    <?php wp_head(); ?>

    <!– Begin wrapper –>
    <div id=”wrapper”>
    <div id=”container”>
    <div id=”blog-header”><div id=”logo”><h1>BlogURL</h1>
    <div id=”description”>here goes the description </div>
    <!– Begin navigation –>
    <div id=”navigation”>
    <div class=”navi-padding”>

    <!– End navigation –>

    <!– Begin content –>

    <!– Begin main column –>
    <div id=”main”>

    <div id=”date-header”>Here goes date</div>

    <!– Begin .post –>
    <div class=”post” id=”post-<?php the_ID(); ?>”>
    <h3 class=”post-title”>” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”><?php the_title(); ?></h3>
    <small><?php the_time(‘F jS, Y’) ?> <!– by <?php the_author() ?> –></small>

    <div class=”post-body”>
    <?php the_content(‘Read the rest of this entry »’); ?></div>

    <div class=”post-footer”>Posted in <?php the_category(‘, ‘) ?> | <?php edit_post_link(‘Edit’,”,’|‘); ?> <?php comments_popup_link(‘No Comments »’, ‘1 Comment »’, ‘% Comments »’); ?></div>

    <?php comments_template(); ?>
    <?php endwhile; ?>

    <p align=”center”><?php next_posts_link(‘« Previous Entries’) ?>   <?php previous_posts_link(‘Next Entries »’) ?>

    <?php else : ?>
    <h2 align=”center”>Not Found</h2>
    <p align=”center”>Sorry, but you are looking for something that isn’t here.
    <?php endif; ?>


    <!– End .post –>

    <!– Begin #comments –>

    <div id=”comments”>comments</div>
    <!– End #comments –>

    <!– End main column –>

    <div id=”sidebar”>
    <object classid=”clsid:D27CDB6E-AE6D-11cf-96B8-444553540000″ codebase=”,0,29,0″ width=”300″ height=”300″>
    <param name=”movie” value=”../Slideshow/slideshow_ecotop.swf” />
    <param name=”quality” value=”high” />
    <embed src=”../Slideshow/slideshow_ecotop.swf” quality=”high” pluginspage=”” type=”application/x-shockwave-flash” width=”300″ height=”300″></embed></object>
    <!– START META –>
    <li id=”meta”><h2><?php _e(‘Meta:’); ?></h2>

    <!– END META –>

    <div class=”flash-bgr”><div class=”flash-banner”>
    <object classid=”clsid:D27CDB6E-AE6D-11cf-96B8-444553540000″ codebase=”,0,29,0″ width=”180″ height=”150″>
    <param name=”movie” value=”” />
    <param name=”quality” value=”high” /><embed src=”” width=”180″ height=”150″ quality=”high” pluginspage=”” type=”application/x-shockwave-flash”></embed></object>

    <?php get_links_list(); ?>
    <!– END LINKS LIST –>

    <ul id=”recently”>test

    <h2 class=”sidebar-title”>Archives</h2>
    <ul class=”archive-list”>

  • archives
  • <!–
    This is a paragraph of text that could go in the sidebar.
    <!– End sidebar –>
    <!– End content –>

    <div id=”footer”>
    <?php do_action(‘wp_footer’); ?>
    <!– End wrapper –>

Viewing 3 replies - 1 through 3 (of 3 total)
  • Please, don’t post long code here; use

    I’ll echo moshu, just pasting line 57, the source of the error, would have sufficed. As it is, the way you have pasted the index, we have no way of knowing what in on line 57.

    Check for an extra character, or a missing character. My experience, that’s the case, you forget a ” or ?> to a tag.

    Just taking a quick glance at your code, it appears that you forgot to actually start your WP loop…i.e. under the <div id=”main”>

    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

    and see if that corrects the problem.

    P.S. I’m with moshu and miklb on the long bits of code…I make no guarantees on whether the above is the necessary fix simply because I didn’t comb through your code 😉

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Template Problem’ is closed to new replies.