• Resolved seaneee

    (@seaneee)


    I have three nested template pages under a singe page called features on the following blog:

    cyclzine.net

    When you click on two of the three nested pages, the tab functionality still works at the top and can take you back to the main page. However, when you click on “Seen on Ebay”, and then try to click on the features tab again, you get this error:

    Parse error: syntax error, unexpected T_ENDWHILE in /home/cyclezin/public_html/wp-content/themes/typographywp/page.php on line 82

    Why would it work on 2 out of the three pages? The page in question is here. Here is the code:

    <?php get_header(); ?>
    
    <div id="posts">
    
    <?php if (have_posts()) : ?>
      <?php while (have_posts()) : the_post(); ?>
      <div class="post" id="post-<?php the_ID(); ?>">
        <!--<ul class="pinfo">-->
          <!--<li class="lileft"><span>-->
    <!--        <?php the_time('j') ?>-->
    <!--        -->
    <!--        <em>-->
    <!--        <?php the_time('M') ?>-->
    
    <!--        </em></span></li>-->
    
    <!--<div id="xsnazzy">
      <b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b>
            <div class="xboxcontent">
    <ul class="pinfo">
                <li class="lileft"><span>
                  <?php the_time('j') ?>
    
                  <em>
                  <?php the_time('M') ?>
                  </em></span>
                </li>
                <li class="liright">
                  <div><div><h1><a title='Permanent Link to <?php the_title(); ?>' href='<?php
                  the_permalink() ?>' rel='bookmark'><?php the_title(); ?></a></h1></div></div>
                </li>
    </ul>
    </div>  
    
    <b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1">
          </b></b>
          </div> -->
    
          <li class="liright">
            <div>
              <div>
                <h1><a title='Permanent Link to <?php the_title(); ?>' href='<?php the_permalink() ?>' rel='bookmark'>
                  <?php the_title(); ?>
                  </a></h1>
              </div>
            </div>
          </li>
        </ul>
        <div class="postcontent">
    <!--/*added this*/
          <?php the_content('<span>Read the rest of this entry...</span>'); ?>
          <span class="postcom"><?php comments_popup_link('contribute', 'one comment', '% comment'); ?></span>
        </div>
      </div>
      <?php endwhile; ?>
      <div id="navigation">
        <?php posts_nav_link('','<span class="prev">Newer Entries &raquo;</span>','') ?>
        <?php posts_nav_link('','','<span class="next">&laquo; Older Entries</span>') ?>
      </div>
      <?php else : ?>
    /*end add*/-->
         <?php the_content('<span>Read the rest of this entry...</span>'); ?>
    <font size=1><?php edit_post_link('edit this post', '', ''); ?></font>
    
        <div id="singleinfo">
          <ul>
            <li class="tags">Tagged as:
              <?php the_tags('',', ','');?>
            </li>
            <li class="categorie">Created by the genius mind of
              <?php the_author() ?>
              in:
              <?php the_category(', '); ?>
            </li>
          </ul>
        </div>
      </div>
      <?php endwhile; ?>
      <?php else : ?>
      <div class="post">
        <ul class="pinfo">
          <li class="lileft"><span> 44
            <em> day </em></span></li>
          <li class="liright">
            <div>
              <div>
                <h1>Hmm! To bad this is a 404 error</h1>
              </div>
            </div>
          </li>
        </ul>
        <div class="postcontent">
          <?php _e('Sorry, no posts matched your criteria.'); ?>
        </div>
      </div>
      <?php endif; ?>
      <div id="comments">
        <?php comments_template(); ?>
      </div>
    </div>
    <?php include('rsidebar.php'); ?>
    <?php get_footer(); ?>
Viewing 6 replies - 1 through 6 (of 6 total)
  • You have this line of code commented out
    <!-- <ul class="pinfo"> -->
    which is creating an unmatched </ul> in the codeblock you posted

    Removing the comments around the UL line in my editor resolved the issue with the mismatched endwhile, which is what was causing the PHP error you are seeing.

    Also, this line of code <div id="posts"> is never closed in the code you listed above – its missing a closing </div> tag.

    Thread Starter seaneee

    (@seaneee)

    Okay. So now it’s back on track. However, one issue still shows up. Under Features, the are several pages like I stated above. When you go to any of the pages, except “seen-on-ebay”, you can use the dropdown menu. But when you go the the ‘seen on ebay’ page, that functionality is gone and the button is static.

    Hi

    I can’t tell exactly what is going on, on that Ebay page. It looks like your dropdowns are controlled by javascript or jquery code. and it looks like that code is not being applied while the ebay page is displayed. Without seeing the code I can’t determine what is going on.

    What you can do is think what might be different about that ebay page, the way it is laid out, settings on it, than other pages. Especially than the Interviews and AskCyclezine pages, since they are on the same menu and it works on them. SOMETHING is different about the Ebay page.

    By the way, you misspelled your URL in your original post. I managed to guess what it probably was. If you reply, it might be a good idea to repost the correct URL so others can see your site also.

    Thread Starter seaneee

    (@seaneee)

    whoops. Sorry. That was a somewhat lame mistake.

    Here it is, correct and all.

    cyclezine.net

    So I was sorta’ thinking the same as you, so I did a few things. I created a new page, with a different title and called on the ebay posts. Same thing.

    Thought maybe it had something to do with the other sections only having one post. So test posted each. Drop downs still worked.

    I think the next thing will be to go through each post and see if there is some sort of code messing with the actual page. Two of the three of those posts are blogger imports.

    Thread Starter seaneee

    (@seaneee)

    Solved.

    Apparently the drop down menu DOES NOT like the version of lightbox I’m using. Killed the lightbox gallery and now it works.

    Thanks all for your patience.

    On the new page you created, remove all the posts, leave just the empty page. If the dropdowns work with the page empty, that proves its something with the posts. Would be best then to add in just one post, work with just one until you get it working. After one works, add in the next one, etc.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Syntax Error- “unexpected T_ENDWHILE” on template page’ is closed to new replies.