jQuery(document).ready(function($) { $('.inline-readmore .et_pb_post').each(function() { var $post = $(this); var $title = $post.find('.entry-title'); var $date = $post.find('.post-meta'); var $button = $post.find('.more-link'); // Wrap title + date in a new div $title.add($date).wrapAll('
'); // Move button to the end if needed $button.appendTo($post); }); });