• I am a beginner at this so bear with me…

    I made some changes to the Page template on my site (www.helenslee.com)in order to remove the entry header (h1) on my home page. In doing so, I created a break in the entry top and entry body sections. It only appears on the home page b/c that is how I changed the code on the template.

    Here is the code (I’ve bolded where I think the error might be):

    <?php get_header(); ?>
    
    	<div id="content">
    		<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    	<div class="entry_body_top"></div>
    <<strong>div class="entry_body" >  
    
    <?php if (!is_page(35) ) {  ?> 
    
    <h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
    
    	 <?php } ?></strong>
    
    	<?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?>
    	<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
    
    	<?php endwhile; endif; ?>
    
      <div style="clear:both;height:10px;"></div>
    	</div>
    	<div class="entry_body_bottom"></div>
    
    	</div>
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>

    Any help would be greatly appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi

    Your problem is that WordPress has wrapped a <p> </p> around your image in the WP editor. That is causing the break on the home page.

    <p><img height="234" width="396" alt="arrowfig" src="http://helenslee.com/wp-content/uploads/2009/02/arrowfig.png" title="arrowfig" class="aligncenter size-full wp-image-106"/></p>

    Go into the HTML tab in the editor, and change <p> to <div> and </p> to </div> and that should resolve the problem. Simply removing the <p> </p> won’t work because WP’s auto-formatting will just put it back in again.

    Thread Starter hsl

    (@hsl)

    Thanks for the reply. However, when I go to the html tab in the editor for that page, the <p> and </p> does not appear. Am I looking in the wrong place?

    Thread Starter hsl

    (@hsl)

    Figured it out…just have to add the <div> </div> to the beginning and end in the html tab.

    Thanks so much for your help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Removing break in entry body’ is closed to new replies.