• Resolved gumbomaverick

    (@gumbomaverick)


    I am developing a template. When I add a page within WP-admin, and add text to the content box and apply the default template, that particular page comes up i.e. whatever I type in that text box for content shows on the page. But when I apply my custom template to the page, the last 3 posts of my blog come up.

    So, I assume Im missing something in the LOOP that WP has documentation on, but I cant figure out why my content that I put on that page doesnt show up.

    I copied the loop exactly from the index.php page in my default theme and it doesnt work. Please help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter gumbomaverick

    (@gumbomaverick)

    Ok, here is more information:

    I have this code in my page where I want the content of a particular page to show, but instead the entire blog shows

    <?php
    if (is_home()) {
      echo '<div id="content">';
    }
    else {
      echo '<div id="content-big">';
    }
    ?>
    
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <div class="post">
    	 <h2 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    	<div class="meta"><?php _e("Blogged under"); ?> <?php the_category(',') ?> <?php _e("by")?> <?php the_author() ?> <?php _e("on");?> <?php the_time('l j F Y'); ?>  <?php edit_post_link(__('Edit This')); ?></div>
    
    	<div class="storycontent">
    		<?php the_content(__('(more...)')); ?>
    	</div>
    
    	<div class="feedback">
                <?php wp_link_pages(); ?>
                <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
    	</div>
    
    </div>
    
    <?php comments_template(); // Get wp-comments.php template ?>
    
    <?php endwhile; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>

    Can someone please tell me why when I go to page->manage and add a new page, put in some text and maybe a picture there and hit publish, why does my blog show instead of that information?

    Thread Starter gumbomaverick

    (@gumbomaverick)

    Nice forum. No help. I figured it out though.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding page blanks out the_content() in Template’ is closed to new replies.