How would I write a WordPress shortcode function from this:
Code:
<?php global ; // required
= array('numberposts'=>1, 'category'=>75,39,46,23, 'order'=>'ASC');
= get_posts();
foreach( as ) : setup_postdata();?>
<h6 class="home-feature"><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h6>
<?php
the_post_thumbnail();
the_excerpt( sprintf(__( 'Read More<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
get_the_title()) ); ?>
<a href="<?php echo get_permalink(); ?>" class="purplez"> Read More</a>
<?php endforeach;
?>