WordPress.org

Ready to get started?Download WordPress

Forums

Stuff added to my entry text (1 post)

  1. Doodlebee
    Member
    Posted 7 years ago #

    I'm having a *weird* issue with my Pages. This doesn't happen anywhere else on the site - only on WP generated Pages. I'm having:

    </ul>
    </li>
    </ul>

    Added to the end of my entry text, before the closing entry div tag, but after the end of the posted content text. I've scoured my files, and I can't see anything that's causing this issue. I've also republished the content, deactivated all plugins and cleared my cache (not necessarily in that order) - they're still there.

    My theme is very customized - in fact, the index stuff is called in through a function. But I have no lists whatsoever in my index.php or in the content section of my functions.php file - so I cannot find where these extra closing tags are coming from. (By the way, VRE is *always* off - I *hate* that thing and never use it.)

    My functions file - that part that has to do with my content - looks like so:

    function post_layout() { ?>
        <div class="post" id="post-<?php the_ID(); ?>">
    	<h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h1>
    	<h2 class="author">by <?php the_author() ?></h2>
         <div class="entry">
    <?php the_content('Read more &raquo;'); ?>
         </div> <!-- /entry -->
    	<p class="postmetadata"><?php the_time('F jS, Y') ?> &nbsp; <?php the_time('g:i a') ?> &nbsp; <?php comments_popup_link('No Comments', 'Comment (1)', 'Comments (%)'); ?>
        </div> <!-- /post -->
    <? }

    As you can see, it's just typical stuff (yes, there's a reason I'm doing it through the functions file, it's not arbitrary). The calls (where I need the above to appear) simply say <?php post_layout(); ?> and nothing more. For example, my index.php file:

    <?php get_header(); ?>
       <div id="content">
    <?php if (is_home()) {
          $my_query = new WP_Query('category_name=main-index-text&showposts=1');
          if(have_posts()) : ?>
    <?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
        <?php post_layout(); ?>
    <?php endwhile; ?>
    <?php endif; ?>
    <?php } else {
          if(have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
        <?php post_layout(); ?>
    <?php endwhile; ?>
    <?php endif; ?>
    <?php } ?>
     <hr class="clear" />
       </div> <!-- /content -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    I cannot figure out *where* the extra closing tags are coming from at all, or why they are appearing. Would anyone have any clues on this? It's throwing off the validity of my code, and causing some weirdness in IE.

    Would anyone have any ideas for me, pretty please?

Topic Closed

This topic has been closed to new replies.

About this Topic