Moving each blog date to bottom of excerpt

On the site homepage, there is a grid section with the two latest blog posts. I need Javascript that will move the date to the bottom of each block (outside of the border). The link is: http://abundancepractice-building.flywheelsites.com

Here is the structure:

Read More
<div class="et_pb_column et_pb_column_4_4">
  <div class="et_pb_blog_grid_wrapper">
    <div class="et_pb_blog_grid clearfix et_pb_bg_layout_light blog-section" style="position: relative; height: 400px;">

    <article id="post-226" class="et_pb_post et_pb_no_thumb post-226 post type-post status-publish format-standard hentry category-uncategorized" style="position: absolute; left: 0px; top: 0px;">


      <h2><a href="http://abundancepractice-building.flywheelsites.com/what-you-learned-in-grad-school-is-ruining-your-website-and-10-ways-to-fix-it/">What You Learned In Grad School is Ruining Your Website (and 10 ways to fix it)</a></h2>

        <p class="post-meta">  Jun 5, 2015  </p>Blog excerpt text...        
    </article> <!-- .et_pb_post -->

So the p.post-meta needs to be attached to the bottom of the block for each. I’m not a Javascript expert, but here’s what I tried so far:

jQuery(function($){
$( ".post-meta:nth-child(1)" ).appendTo(".et_pb_post.et_pb_no_thumb:nth-    child(1)");
$( ".post-meta:nth-child(2)" ).appendTo(".et_pb_post.et_pb_no_thumb:nth-child(2)");
});

and

jQuery(function($){

if ($('body').hasClass('et_pb_blog_grid')) {
$('.et_pb_post p')
.each(function() {
  var n = jQuery(this).find(".post-meta").html();
  $(n).clone().insertAfter(jQuery(this).find('.et_pb_post.et_pb_no_thumb'));
});
}

});

Related posts

1 comment

  1. There’s no need to use javascript to do this.

    Just edit the template and move

    <?php the_excerpt(); ?> 
    

    to before the post date.

    Edit:

    open your homepage in the wp admin area and make a note of the template name it uses.

    Then search your template files in your themes folder for that name it should appear like:

    <?php
    /*
      Template Name: Homepage
     */
    ?>
    

    That will be the file you need to modify

Comments are closed.