Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Date and Byline under title

By: a guest on Dec 16th, 2012  |  syntax: PHP  |  size: 0.96 KB  |  hits: 225  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Here is the function I'm trying:
  2.  
  3. function abyline_posted_on() {
  4.         $link= esc_url( get_permalink() );
  5.         $title= esc_attr( get_the_title() );
  6.         $time= esc_attr( get_the_time() );
  7.         $dateGMT= esc_attr( get_the_date( 'c' ) );
  8.         $date= esc_html( get_the_date() );
  9.         $authorURL= esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) );
  10.         $author= esc_html( get_the_author() );
  11.         echo ('<span class="sep">Posted on</span> <a href="'.$link.'" title="'.$title.'" rel="bookmark"><time class="entry-date" datetime="%3$s" pubdate>'.$date.' at '. $time.'</time></a> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="'.$authorURL.'" title="'.$author.'" rel="author">'.$author.'</a></span>');
  12.     }
  13.  
  14. Here is the call I put in my content.php file
  15.  
  16. <?php if ( 'post' == get_post_type() ) : ?>
  17.         <div class="entry-meta">
  18.         <?php abyline_posted_on(); ?>
  19.         </div><!-- .entry-meta -->
  20.         <?php endif; ?>