Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have my Reading settings set to Static pages and blog is set to a page called What's New.

When I go to this What's New page I can see the post content but the post title with link to post page is not displaying. I can only see the post content.

I have done everything I can think of to find the error, with no luck, please help!

Code for index.php:

<div id="content" class="narrowcolumn" role="main">
    <?php if (have_posts()) : ?>
        <?php while (have_posts()) : the_post(); ?>
            <div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
                <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s'), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></h2>
                <small><?php the_time(__('F jS, Y')) ?> <!-- by <?php the_author() ?> --></small>
                <div class="entry">
                    <?php the_content(__('Read the rest of this entry &raquo;')); ?>
                </div>
                <p class="postmetadata"><?php the_tags(__('Tags:') . ' ', ', ', '<br />'); ?> <?php printf(__('Posted in %s'), get_the_category_list(' ')); ?> | <?php edit_post_link(__('Edit'), '', ' | '); ?>  <?php comments_popup_link(__('No Comments &#187;'), __('1 Comment &#187;'), __('% Comments &#187;''), '', __('Comments Closed') ); ?></p>
            </div>
        <?php endwhile; ?>

I'm not sure if it's relevant but I have the commented out on the page template.

Code for whats-new.php:

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="post" id="post-<?php the_ID(); ?>">
        <h1><?php the_title(); ?></h1>
            <div class="entry">
                <?php the_content(''); ?>
            </div>
        </div>
</div>
<?php endwhile; endif; ?>

I hope someone can help! If you have any ideas they're much appreciated. I've tried removing parts of my functions file, making the blog the home page under settings, and so other stuff.

Any ideas?

share|improve this question
4  
The grayed-out text in your 2nd code block means that whatever it's there is ignored by the browser, and guess what? It just happens to be the title –  onetrickpony Jun 27 '11 at 5:27
    
Yes, thanks! I have tried removing those comments and it has no effect. Still doesn't show the title. –  talkingD0G Jun 27 '11 at 23:51
add comment

2 Answers

Remove the <!-- --> in <!--<h1><?php the_title(); ?></h1>--> these are html comments so it won't get displayed.

share|improve this answer
    
I did try removing them and it had no effect. –  talkingD0G Jun 27 '11 at 23:50
add comment

This was possibly that your page was set to be an "Aside" not a "Standard" post in the options at the side.

That caused the problem you describe for me.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.