Creating a related posts section in wordpress inside a default post
function related_posts_shortcode( $atts, $content = null ) { //extract the shortcode atts and set default extract( shortcode_atts( array( ‘cat’ => ”, ‘limit’ => 4 ), $atts ) ); //store the current post ID so we don’t display it as featured $post_ID = get_the_ID(); //set up our args for the query $args = array( ‘cat’ => … Read more