Creating Features List in WordPress Post
Convert the items in the shortcode into an array, and return a list: add_shortcode( ‘features_list’, ‘shortcode_features_list’ ); function shortcode_features_list( $atts = array(), $content=”” ) { $content = trim( $content ); if ( ” === $content ) return; $items = explode( “\n”, $content ); $items = array_map( ‘trim’, $items ); return ‘<ul class=”features”><li>’ . join( ‘</li><li>’, … Read more