How can i display gallery shortcode output under Post text
The do_shortcode() function returns the shortcode output as a string, which can be appenend to the post content with the_content filter. Here’s an example how to do that, // add filter with late priority add_filter(‘the_content’, ‘my_post_attachments_gallery’, 99); function my_post_attachments_gallery($content) { // modify only published posts if ( is_singular( ‘post’) && ‘publish’ === get_post_status() ) { … Read more