WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Get entry info to appear under post title... (8 posts)

  1. Scanarama
    Member
    Posted 5 years ago #

    Hi all,

    I would like to get my entry info (dates/author) to appear underneath the post title. It's on top of the post title at the moment it looks like the info for the post above.

    I'm no expert on CSS but I tried playing with the padding on h2 to no avail.

    The blog is http://www.trendspot.ie/blog

    Can anyone help?

    Thanks

  2. tugbucket
    Member
    Posted 5 years ago #

    This is just an example because we need to see your loop to be specific. In your Single.php and Index.php you'll have some lines in the loop that look something like this:

    <?php the_date(); ?><?php the_author(); ?><?php comments... ?>
    <?php the_title(); ?>

    just swap the location the the title like so:

    <?php the_title(); ?>
    <?php the_date(); ?><?php the_author(); ?><?php comments... ?>

    Again actually seeing the code for your loop would result in a more specific answer.

    This most likely can be done with CSS but rearranging the loop is best.

  3. Scanarama
    Member
    Posted 5 years ago #

    Thanks for the reply.

    The single.php is

    <?php get_header() ?>

    <div id="container">
    <div id="content">

    <?php the_post() ?>

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

    <div class="entry-info">TAG» <?php the_tags('',', ',''); ?></div>

    <h2 class="entry-title"><?php the_title(); ?></h2>

    <div class="entry-content">
    <?php the_content(); ?>
    </div>

    <div class="entry-meta">
    <span class="icat">CATEGORY: <?php the_category(' '); ?></span> / <span class="trackback-link">/" title="Trackback URL for your post" rel="trackback">Trackback URL</span><span><?php edit_post_link(' / Edit'); ?></span>
    </div>

    <?php if (is_single() && function_exists('st_related_posts')) { ?>
    <div id="r_posts">
    <?php st_related_posts('number=5&include_page=false&order=data-asc&title='); ?><!--Notice: the "Related Post" function will only displayed in case you have installed the "Simple tags" Plugin. the URL is http://wordpress.org/extend/plugins/simple-tags, hmmm, sofish is always thinking about others^,^... -->
    </div>
    <?php } ?>

    </div><!-- .post -->

    <?php comments_template(); ?>

    </div><!-- #content -->
    </div><!-- #container -->

    <?php get_sidebar() ?>
    <?php get_footer() ?>

  4. Scanarama
    Member
    Posted 5 years ago #

    The index.php is...

    `<?php get_header(); ?>

    <div id="container">
    <div id="content">

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

    <?php while (have_posts()) : the_post(); ?>
    <div id="post-<?php the_ID(); ?>" class="post">

    <div class="entry-info"><?php the_time('Y-m-d'); ?> / <?php the_author_posts_link(); ?> / <?php comments_popup_link('No Comment','One Comment','% Comments'); ?><?php edit_post_link(' / Edit'); ?></div>

    <h2 class="entry-title">" rel="bookmark" title="Permanent Links to <?php the_title_attribute(); ?>"><?php the_title(); ?></h2>

    <div class="entry-content"><?php the_content('Continue Reading »'); ?></div>
    </div><!--.post-->
    <?php endwhile; ?>

    <div class="navigation">
    <?php wp_pagenavi(); ?>
    </div>

    <?php else : ?>

    <h2 class="entry-title">Not Found</h2>
    <p>Sorry, but what you are looking for isn't here...</p>
    <?php include (TEMPLATEPATH . "/searchform.php"); ?>

    <?php endif; ?>
    </div><!--#content-->
    </div><!--#container-->

    <?php get_sidebar(); ?>
    <?php get_footer(); ?>`

  5. tugbucket
    Member
    Posted 5 years ago #

    cool, thanks.

    try this, take:

    <div class="entry-info">TAGĀ» <?php the_tags('',', ',''); ?></div>
    <h2 class="entry-title"><?php the_title(); ?></h2>

    and make it look like this:

    <h2 class="entry-title"><?php the_title(); ?></h2>
    <div class="entry-info">TAGĀ» <?php the_tags('',', ',''); ?></div>
  6. tugbucket
    Member
    Posted 5 years ago #

    in your index.php take:

    <div class="entry-info"><?php the_time('Y-m-d'); ?> / <?php the_author_posts_link(); ?> / <?php comments_popup_link('No Comment','One Comment','% Comments'); ?><?php edit_post_link(' / Edit'); ?></div>
    
    <h2 class="entry-title">" rel="bookmark" title="Permanent Links to <?php the_title_attribute(); ?>"><?php the_title(); ?></h2>

    and make it look like:

    <h2 class="entry-title">" rel="bookmark" title="Permanent Links to <?php the_title_attribute(); ?>"><?php the_title(); ?></h2>
    
     <div class="entry-info"><?php the_time('Y-m-d'); ?> / <?php the_author_posts_link(); ?> / <?php comments_popup_link('No Comment','One Comment','% Comments'); ?><?php edit_post_link(' / Edit'); ?></div>
  7. Scanarama
    Member
    Posted 5 years ago #

    Thanks man. Much appreciated.

  8. Scanarama
    Member
    Posted 5 years ago #

    It seems to have worked but the title has some stuff written before it...

    http://www.trendspot.ie/blog

    Thanks again

Topic Closed

This topic has been closed to new replies.

About this Topic