• Hello,

    I have taken the loop from the default wp theme and pasted it into my index.

    Some of the items are showing up, others aren’t. even code on the same line will only half appear.

    for instance, the content will show but the ‘read more…’ will not.

    where its calls the author name, all that shows from that line is the category, no ‘by’ or name.

    the comments popup does not show either. when clicked the no comments links just goes to the single post page.

    I have the popup-link file in the theme folder. I have written the ‘if(is_singular…’ line into the header.

    i have comments enabled and threaded comments also.

    please see below for the code.

    many thanks!

    ‘<?php if (have_posts()) : ?>

    <?php while (have_posts()) : the_post(); ?>

    <div <?php post_class() ?> id=”post-<?php the_ID(); ?>”>
    <h2>” rel=”bookmark” title=”Permanent Link to <?php the_title_attribute(); ?>”><?php the_title(); ?></h2>
    <small><p class=”authorName” by <?php the_author_meta(‘first_name’);?> <?php the_author_meta(‘last_name’); ?> for <?php the_category(“, “) ?></p></small>

    <div class=”entry”>
    <?php the_content(‘Read the rest…’); ?>
    </div>

    <p class=”postmetadata”><?php the_tags(‘Tags: ‘, ‘, ‘, ”); ?> Posted in <?php the_category(‘, ‘) ?> | <?php edit_post_link(‘Edit’, ”, ‘ | ‘); ?> <?php comments_popup_link(‘No Comments »’, ‘1 Comment »’, ‘% Comments »’); ?></p>
    </div>

    <?php endwhile; ?>

    <div class=”navigation”>
    <div class=”alignleft”><?php next_posts_link(‘« Older Entries’) ?></div>
    <div class=”alignright”><?php previous_posts_link(‘Newer Entries »’) ?></div>
    </div>
    <?php endif; ?>’

Viewing 4 replies - 1 through 4 (of 4 total)
  • You are missing a ‘>’ just ahead of the ‘by’:

    <small><p class="authorName" by <?php the_author_meta('first_name');?>

    Should be:

    <small><p class="authorName"> by <?php the_author_meta('first_name');?>

    Thread Starter frankjkeane

    (@frankjkeane)

    nice one, thanks vtx, I’ll give it a go.

    Thread Starter frankjkeane

    (@frankjkeane)

    yeah that got the “by” but author name still not showing. could it be anything to do with being hosted on mamp server?

    I don’t think it would be mamp – I use xampp and they are pretty much the same.

    Maybe it has to do with the way the query is set up just ahead of the code you posted. Are you using query_posts()? Is there a second query before that one?

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘certain items in loop not appearing NEWBIE!’ is closed to new replies.