Support

Account

Home Forums ACF PRO Combine Multiple Tabs / tab groups Reply To: Combine Multiple Tabs / tab groups

  • Hi @nkals722

    I’ve just checked this plugin: https://wordpress.org/plugins/acf-merge-group-tabs/ and made some modification for ACF 5. It’s not working properly on my end, but I hope it’s working on your end. Please add this code to your functions.php file:

    add_action('admin_footer', function() {
    
    	$screen = get_current_screen();
    	if ( $screen->base == 'post' ) {
    		echo '
    		<!-- ACF Merge Tabs -->
    		<script>		
    
    			var $boxes = jQuery("#postbox-container-2 .postbox .acf-field-tab").parent(".inside");
    
    			if ( $boxes.length > 1 ) {
    
    			    var $firstBox = $boxes.first();
    
    			    $boxes.not($firstBox).each(function(){
    				    jQuery(this).children().appendTo($firstBox);
    				    jQuery(this).parent(".postbox").remove();				    
    			    });
    				
    			}
    			
    		</script>';
    	}
    	
    });

    Hope this helps.