Split Content and Gallery

Posted by Prem Tiwari | Updated on

Open to anybody who can simplify this but here’s what I came up with that worked for me. First thing’s first – get the gallery, using get_post_gallery(), as soon as the loop starts:

strip_shortcode_gallery() Function – functions.php file:

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers