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 cannot get the main blog page with the current blog to show the current blog title. It shows on all other pages, just not the current/most recent blog. Any help will be greatly appreciated. Thank you.

<div id="page">

    <div id="contentleft">

        <?php if ( $paged < 2 ) { // Do stuff specific to first page?>

        <?php $my_query = new WP_Query('category_name=featured&showposts=1');
        while ($my_query->have_posts()) : $my_query->the_post();
         $do_not_duplicate = $post->ID;?>

        <div class="featurepost" id="post-<?php the_ID(); ?>">

            <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?>"><?php the_title(); ?>"><?php the_title(); ?></a></h2>

            <p class="postinfo">By <?php the_author_posts_link(); ?> on <?php the_time('M j, Y') ?> in <?php the_category(', ') ?> | <?php comments_popup_link('0 Comments', '1 Comment', '% Comments'); ?><?php edit_post_link('Edit', ' | ', ''); ?></p>

            <div class="entry">
                    <?php the_content('Read the rest'); ?>
                </div>

        </div>

    <?php endwhile; ?>
share|improve this question
1  
What title are you referring to? i assume you do not mean a post title... –  vancoder May 8 '13 at 21:51
    
yes, the post title...www.stevekrautcoaching.com/blog –  Natalie Olson May 8 '13 at 21:51
    
What file is the code above from? –  vancoder May 8 '13 at 22:36
    
Above is from the index.php file –  Natalie Olson May 8 '13 at 23:24
    
www.stevekrautcoaching.com/blog is't loading any div with the id 'featurepost'. And if there is a problem with the dynamic codes, the HTML won't be affected as the code mentioned above. I found no <h2> using Firebug into your blog URL. The hierarchy I found is: –  Mayeenul Islam May 9 '13 at 4:46

1 Answer 1

I believe that first page is your index.php, and I would guess that the code within that file is different from single.php, which is the file used by pages 2 onwards.

share|improve this answer
    
here is the single.php code: –  Natalie Olson May 8 '13 at 22:30
    
<div id="page"> <div id="contentleft"> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <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(); ?>"><?php the_title(); ?>"><?php the_title(); ?></a></h1> <p class="postinfo">By <?php the_author_posts_link(); ?> on <?php the_time('M j, Y') ?> in <?php the_category(', ') ?><?php edit_post_link('Edit', ' | ', ''); ?></p> <div class="entry"> <?php the_content(); ?> –  Natalie Olson May 8 '13 at 22:31

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.