query_vars['page'] ) || ! is_singular() || empty( $wp_query->post ) ) { return $handled; } $document = Plugin::elementor()->documents->get( $wp_query->post->ID ); return $this->is_valid_pagination( $document->get_elements_data(), $wp_query->query_vars['page'] ); } public function __construct() { parent::__construct(); Plugin::elementor()->data_manager->register_controller( Controller::class ); add_filter( 'pre_handle_404', [ $this, 'allow_posts_widget_pagination' ], 10, 2 ); } }