Support » Fixing WordPress » why does this meta info show up above my posts

  • Resolved kvnmcwebn

    (@kvnmcwebn)


    This meta data is showing up from my archive page. there are no syntax errors showing up in dreamweaver and I double checked the tutorial code that I used.

    class=”post-13 post type-post status-publish format-standard hentry category-dance-classes” id=”post-13″
    post shows up here fine……

    heres the code in the archive page:
    `<?php if (have_posts() ) : ?>

    <?php if (is_category()) { ?>
    <h2 id=”archiveTitle”>Archive for the ‘<?php single_cat_title(); ?>’ Category</h2>
    <?php } elseif( is_tag()) { ?>
    <h2 id=”archiveTitle”>Posts Tagged ‘ <?php single_tag_title(); ?>’</h2>

    <?php } elseif (is_day()) { ?>
    <h2 id=”archiveTitle”>Archive for <?php the_time(‘F jS, Y’); ?> </h2>

    <?php } elseif (is_month()) { ?>
    <h2 id=”archiveTitle”>Archive for <?php the_time(‘F Y’); ?> </h2>

    <?php } elseif (is_year()) { ?>
    <h2 id=”archiveTitle”>Archive for <?php the_time(‘Y’); ?> </h2>

    <?php } elseif (is_author()) { ?>
    <h2 id=”archiveTitle”>Author Archive</h2>

    <?php } elseif (isset($_GET[‘paged’]) && !empty($_GET[‘paged’])) { ?>
    <h2 id=”archiveTitle”>Archives</h2>
    <?php } ?>
    <?php while (have_posts()) : the_post(); ?>
    <?php post_class() ?> id=”post-<?php the_ID(); ?>”

    <div class=”entry”>

    <h3 ><a href=”<?php the_permalink() ?>”><?php the_title(); ?> </a></h3>
    <?php the_excerpt(); ?>

    </div>
    <em class=”postedon”> Posted on: <?php the_time(‘F jS, Y’) ?></em>
    <em class=”postedby”>by <?php the_author() ?></em>
    <div class=”postmetadata”>
    <?php the_tags(‘Tags: ‘, ‘,’, ‘<br />’); ?>
    Posted in <?php the_category(‘, ‘)?> |
    <?php comments_popup_link(‘No Comments »’, ‘ 1 Comment »’, ‘% Comments »’); ?>

    <?php endwhile; ?>

    <?php else : ?>
    <h2>Not Found</h2>
    <?php endif ; ?>`

Viewing 10 replies - 1 through 10 (of 10 total)
  • can you share link to problematic webpage it will make easy to understand code.

    The code looks ok, maybe it’s a css issue and the meta is floating above?
    Maybe the meta needs to be inside the <div class=”entry”>?
    Can you provide a link to your stie instead?

    Thread Starter kvnmcwebn

    (@kvnmcwebn)

    hi thanks for the replies.

    well it’s good to know that the syntax looks ok.

    here is a link to a listings page where the problem shows up.

    meta data above excerpts

    i am not able to find loop in your code which is displaying posts.
    because class="post-27 post type-post status-publish format-standard hentry category-services-and-schools" id="post-27"

    it will be above your loop

    Maybe WordPress is not recognizing the spaces in your ‘class’ names? Thereby not treating them as CSS?

    Those classes are the output of the body_class() function, which is normally added to the opening <body> tag at the end of your header file. There’s no way to tell from your link if there’s something wrong with the way it’s coded in the header, or if something else (mostly likely a badly-coded plugin) is causing it to be rendered wrong.

    Thread Starter kvnmcwebn

    (@kvnmcwebn)

    Hi thanks everyone.
    Amy the only plug in I’m using is the jetpack. Could it be something in the functions.php file thats not right?

    here is the header bit

    ….wp_head();
    ?>
    </head>

    <body <?php body_class(); ?>>
    <header>
    <div id=”header”>
    <div id=”searchbar”>
    <aside id=”search” class=”widget”>
    <?php get_search_form(); ?>….

    thanks

    Thread Starter kvnmcwebn

    (@kvnmcwebn)

    it’s not a plug in problem either.hmm

    Thread Starter kvnmcwebn

    (@kvnmcwebn)

    I just removed this:
    <?php while (have_posts()) : the_post(); ?>
    <?php post_class() ?> id=”post-<?php the_ID(); ?>”

    I’m not sure what that was in the tutorial for. Working now anyway.

    but it is still on your page

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘why does this meta info show up above my posts’ is closed to new replies.