Support » Plugin: Posts in Page » Add date to meta info

  • Resolved lekjaz

    (@lekjaz)


    Great plugin. There’s probably an easy way to do this. I’d like to add the published date to the meta information displayed beneath each post heading in the list. I see the place in posts_loop_template.php where the edit would likely happen, but being a novice I’m unsure how to modify it without blowing it up.

    • This topic was modified 5 years, 2 months ago by lekjaz.
Viewing 1 replies (of 1 total)
  • Plugin Author Eric Amundson

    (@sewmyheadon)

    Hey @lekjaz,

    I’d like to add the published date to the meta information displayed beneath each post heading in the list. I see the place in posts_loop_template.php where the edit would likely happen, but being a novice I’m unsure how to modify it without blowing it up.

    It depends a bit on where you’d like the date to appear.

    Most likely, you’ll want to add a snippet like this in the place where you desire the date to appear:

    <div class="post-date"><?php the_date(); ?></div><!-- post-date -->

    Looking at the default posts_loop_template.php file, I’d recommend trying it here (starting on lucky line 13):

    <!-- Post Wrap Start-->
    <div class="post hentry ivycat-post">
    	
    	<!-- 	This outputs the post TITLE -->
    	<h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    	<!-- 	This outputs the post DATE -->
    	<div class="post-date"><?php the_date(); ?></div>
    
    	<!-- 	This outputs the post EXCERPT.  To display full content including images and html, 
    		replace the_excerpt(); with the_content();  below. -->
    	<div class="entry-summary">
    		<?php the_excerpt(); ?>
    	</div>

    I hope that helps!

    Eric

Viewing 1 replies (of 1 total)
  • The topic ‘Add date to meta info’ is closed to new replies.