Support

Account

Home Forums Backend Issues (wp-admin) Tabs not working properly in Widgets Reply To: Tabs not working properly in Widgets

  • no worries, see attached!

    in case it helps I’m on WordPress v4.4.1.

    The Field Group is associated with a very simple custom widget that is essentially just an empty shell for ACF, here’s the code:

    <?php
    
    	class SECallToActionWidget extends WP_Widget {
    
    		public function __construct() {
    			parent::__construct(
    		 		'se_call_to_action_widget', 
    				'Call to Action', 
    				array( 'description' => 'Displays a call to action tile', ) 
    			);
    		}
    	
    
    		public function widget( $args, $instance ) {
    
    			extract($args);
    			// Loads theme file to handle ACF fields on front end
                include (THEME_FILE_PATH.'widget-call-to-action.php');			
    				
    		}
    	
    		public function update( $new_instance, $old_instance ) {
    		    $instance = $old_instance;		    
    		    return $instance;
    		}
    	
    	
    	}
    

    One other thing i notice is that if i do anything to the form that triggers js (such as selecting a “Link Type” radio button, which causes other fields to hide/show) the tabs then snap into action.

    So i’m guessing the JS that sets up the tabs is firing too early, or not at all, when the user expands a widget option box.