How to add if statement on WordPress shortcode output
You can use buffer, so instead of storing your markup in the $output variable and then print that variable inside your wrapper, you can store everything in buffer, save it all in a variable and return that variable function byn_recent_resources_shortcode($atts, $content = null) { //…Put the same logic as in your question code //…Change, for … Read more