[resolved] Post meta data floated to the right of post (3 posts)

  1. ffffffri
    Posted 3 years ago #

    I'm trying to style a client's blog to show a post's meta data floated to the right of each post like this: Screenshot. I'm working with a barebones wordpress template and I'm not sure how to go about doing this with the loop that was provided. I know how to float two div's with CSS but not sure how to make it work in this case. Can anyone point me in the right direction?

    The loop:

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    		<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    			<h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
    <?php include (TEMPLATEPATH . '/inc/meta.php' ); ?>
    <div class="entry">
    <?php the_content(); ?>
    <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 include (TEMPLATEPATH . '/inc/nav.php' ); ?>
    <?php else : ?>
    <h2>Not Found</h2>
    <?php endif; ?>
  2. paulwpxp
    Font hero
    Posted 3 years ago #

    Look inside

    <?php include (TEMPLATEPATH . '/inc/meta.php' ); ?>

    I think it's where the so called "post on" is, look for the markup, we need the class or id for floating.

    Also, to achieve the exact same look as in the screenshot, you have to take out the the_tags() and the_category() from the postmetadata div and put them inside /inc/meta.php

    and ( optional ) it's a good idea to change the_content() to the_excerpt() with customized read more link.

  3. ffffffri
    Posted 3 years ago #

    Thanks for the help.

Topic Closed

This topic has been closed to new replies.

About this Topic