• Hi,

    You have a block of code in this file that needs a tiny change around line 42.

    At line 42, you check to see if( !empty( $query[post_type] ) ) but only for the next 2 lines of code. The 3rd line of code also uses $query[post_type] so it just needs to be moved into the ‘if’ block. See below.

    Thanks,
    Colin

    if( !empty( $query['post_type'] ) )
    	{
    		if($query['post_type'] == '_all')
    			$query['post_type'] = siteorigin_widget_post_selector_all_post_types();
    
    		$query['post_type'] = strpos( $query['post_type'], ',' ) !== false ? explode( ',', $query['post_type'] ) : $query['post_type'];
    
    		if( $query['post_type'] == 'attachment' && $query['post_status'] == 'publish' )
    		{
    			$query['post_status'] = 'inherit';
    		}
    	}

    https://wordpress.org/plugins/so-widgets-bundle/

  • The topic ‘base/inc/post-selector.php needs to check if $query[post_type] is set’ is closed to new replies.