Adding time to posts
-
Hi all, forgive me if this is a stupid question but I am awful with code.
I wish to add the time to post posts, currently they say this:
BY JAMIE DĄBROWIECKI, MARCH 6, 2013 (on the homepage)
Published on March 6, 2013, by Jamie Dąbrowiecki (on the post itself)What I want them to say:
BY JAMIE DĄBROWIECKI, MARCH 6, 2013, 15:34 (on the homepage)
Published on March 6, 2013 at 15:34 by Jamie Dąbrowiecki (on the post itself)Is this possible? Here is my current single.php template:
<?php get_header(); ?> <!-- BEGIN MAIN WRAPPER --> <div id="main-wrapper"> <!-- BEGIN MAIN --> <div id="main"> <!-- BEGIN POST --> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div id="post"> <h1 class="post-header"><?php the_title(); ?></h1> <p class="post-meta">Published on <?php the_time( get_option('date_format') ); ?>, by <?php the_author_posts_link(); ?> - Posted in <?php the_category(', ') ?> <span class="meta-comment"><a href="#respond"><?php comments_number('0', '1', '%' );?></a></span></p> <?php if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) { /* if post has a thumbnail */ ?> <div class="post-thumb"> <?php the_post_thumbnail(); ?> </div> <?php } ?> <div class="post-entry"> <?php the_content(); ?> <?php wp_link_pages('before=<span class="page-links"><strong>Pages:</strong> &after=</span>'); ?> </div> <?php if(get_option('lp_share_post') == "false" || get_option('lp_share_post') == "") { ?> <div class="post-share"> <p>SHARE THIS POST</p> <ul> <li><a href="<?php bloginfo('rss2_url'); ?>" title="Subscribe to our feed"><img src="<?php echo get_template_directory_uri(); ?>/images/rss-big.png" alt="" /></a></li> <?php if (get_option('lp_share_post_facebook') == "true") { ?> <li><a href="http://www.facebook.com/sharer.php?u=<?php the_permalink();?>?t=<?php the_title(); ?>" title="Post to Facebook"><img src="<?php echo get_template_directory_uri(); ?>/images/facebook-big.png" alt="Facebook" /></a></li> <?php } ?> <?php if (get_option('lp_share_post_twitter') == "true") { ?> <li><a href="http://twitter.com/home/?status=<?php the_title(); ?> - <?php the_permalink(); ?>" title="Post to Twitter"><img src="<?php echo get_template_directory_uri(); ?>/images/twitter-big.png" alt="Twitter" /></a></li> <?php } ?> <?php if (get_option('lp_share_post_myspace') == "true") { ?> <li><a href="http://www.myspace.com/index.cfm?fuseaction=postto&t=<?php the_title(); ?>&c=Check this out&u=<?php the_permalink(); ?>&l=>" title="Post to Myspace"><img src="<?php echo get_template_directory_uri(); ?>/images/myspace.png" alt="Myspace" /></a></li> <?php } ?> <?php if (get_option('lp_share_post_google') == "true") { ?> <li><a href="http://www.google.com/reader/link?title=<?php the_title();?>&url=<?php the_permalink();?>" title="Google Buzz"><img src="<?php echo get_template_directory_uri(); ?>/images/google.png" alt="Google Buzz" /></a></li> <?php } ?> <?php if (get_option('lp_share_post_reddit') == "true") { ?> <li><a href="http://www.reddit.com/submit?url=<?php the_permalink(); ?>&title=<?php the_title(); ?>" title="Share on Reddit"><img src="<?php echo get_template_directory_uri(); ?>/images/reddit.png" alt="Reddit" /></a></li> <?php } ?> <?php if (get_option('lp_share_post_stumbleupon') == "true") { ?> <li><a href="http://www.stumbleupon.com/submit?url=<?php the_permalink(); ?>&title=<?php the_title(); ?>" title="Stumble this"><img src="<?php echo get_template_directory_uri(); ?>/images/stumbleupon.png" alt="Stumnleupon" /></a></li> <?php } ?> <?php if (get_option('lp_share_post_delicious') == "true") { ?> <li><a href="http://del.icio.us/post?url=<?php the_permalink();?>&title=<?php the_title(); ?>" title="Add To Delicious"><img src="<?php echo get_template_directory_uri(); ?>/images/delicious.png" alt="Delicious" /></a></li> <?php } ?> <?php if (get_option('lp_share_post_digg') == "true") { ?> <li><a href="http://digg.com/submit?url=<?php the_permalink();?>&title=<?php the_title(); ?>&thumbnails=1" title="Digg this!"><img src="<?php echo get_template_directory_uri(); ?>/images/digg.png" alt="Digg" /></a></li> <?php } ?> <?php if (get_option('lp_share_post_technorati') == "true") { ?> <li><a href="http://technorati.com/signup/?f=favorites&Url=<?php the_permalink(); ?>" title="Post to Technorati"><img src="<?php echo get_template_directory_uri(); ?>/images/technorati.png" alt="Technorati" /></a></li> <?php } ?> <?php if (get_option('lp_share_post_email') == "true") { ?> <li class="email"><a href="mailto:?subject=<?php the_title(); ?>&body=<?php the_permalink(); ?>" title="Email a Friend"><img src="<?php echo get_template_directory_uri(); ?>/images/email.png" alt="Email" /></a></li> <?php } ?> </ul> </div> <?php } ?> <?php if(get_option('lp_author_box') == "false" || get_option('lp_author_box') == "") { ?> <div id="about-author"> <?php echo get_avatar( get_the_author_email(), '75' ); ?> <h5><strong>Author:</strong> <?php the_author(); ?> <small>View all posts by <?php the_author_posts_link(); ?></small></h5> <div class="author-descrip"><?php the_author_meta("description"); ?></div> </div> <?php } ?> <!-- BEGIN COMMENTS --> <div id="comments"> <?php comments_template(); ?> </div> <!-- END COMMENTS --> </div> <!-- END POST --> <?php endwhile; endif; ?> </div> <!-- END MAIN --> <?php get_sidebar(); ?> <?php get_footer(); ?>
The topic ‘Adding time to posts’ is closed to new replies.