• I am wondering if anyone has an easy way (plugin preferred) to be able to extract, on a periodic basis, the titles, URLs and summaries of my blog posts.

    Instead of having each post shared automatically to social media or wherever, I would like to be able to share a weekly summary of the 5 or 6 posts I made that week.You see this all the time in newspaper or other news related sites – a list, with excerpts, of a number of posts in one place, with clickable links to the originals. A compilation of the week’s activity for example.

    I guess I could do a cumbersome cut and paste but that will get old real quick. Anyone know a good way to “automate” this and just select a half dozen posts and have them summarized in one place with title, link and excerpt (and maybe featured image)?

Viewing 1 replies (of 1 total)
  • 
    <?php
    	/* get last 6 posts from the last 7 days */
    	$args = array(
    		'post_type' => 'post',
    		'post_status' => 'publish',
    		'orderby' => 'date',
    		'order' => 'DESC',
    		'posts_per_page' => '6',
    		'date_query' => array(
    			array(
    				'after' => '1 week ago'
    			)
    		)
    	);
    	$query = new WP_Query($args);
    	if ( $query->have_posts() ) {
    		while ( $query->have_posts() ) {
    			$query->the_post();
    			?>
    			<ul>
    				<li><?php the_title(); ?></li>
    				<li><?php the_permalink(); ?></li>
    				<li><?php the_excerpt(); ?></li>
    				<li><?php the_post_thumbnail();?></li>
    			</ul>
    			<?php
    		}
    	}
    	wp_reset_postdata();
    ?>

    Obviously a pretty crude and bare bones query example but that returns what you are asking for.

Viewing 1 replies (of 1 total)
  • The topic ‘Export Post Summaries’ is closed to new replies.