How do I change the gallery that is inserted in the post?
You can filter the default gallery shortcode. Here is something I’ve used in the past. add_filter( ‘post_gallery’, ‘wpse_gallery’, 10, 2 ); function wpse_gallery() { global $post; /* Orderby */ if ( isset( $attr[‘orderby’] ) ) : $attr[‘orderby’] = sanitize_sql_orderby( $attr[‘orderby’] ); if ( !$attr[‘orderby’] ) unset( $attr[‘orderby’] ); endif; /* * Extract default gallery settings … Read more