found_posts ) { $current_url = get_permalink( get_queried_object_id() ); $themer_archive_404 = ( 'fl-theme-layout' === $query->posts[0]->post_type && stripos( $current_url, 'fl-theme-layout' ) > 0 ); if ( $themer_archive_404 ) { $module->render_404(); } } // Render the posts. if ( ! $themer_archive_404 && $query->have_posts() ) : do_action( 'fl_builder_posts_module_before_posts', $settings, $query ); $data_source = isset( $settings->data_source ) ? $settings->data_source : 'custom_query'; $post_type = isset( $settings->post_type ) ? $settings->post_type : 'post'; $paged = ( FLBuilderLoop::get_paged() > 0 ) ? ' fl-paged-scroll-to' : ''; ?>
> get_posts_container() ) : if ( '' != $module->settings->posts_container_ul_class ) { echo '
pagination && $query->have_posts() && $query->max_num_pages > 1 ) : ?>
pagination, array( 'scroll', 'load_more' ) ) ) ? ' style="display:none;"' : ''; ?>>
pagination && $query->max_num_pages > 1 ) : ?>
get_button_settings() ); ?>
have_posts() ) { $module->render_404(); } wp_reset_postdata(); // Restore the original current post. // // Note that wp_reset_postdata() isn't enough because it resets the current post by using the main // query, but it doesn't take into account the possibility that it might have been overridden by a // third-party plugin in the meantime. // // Specifically, this used to cause problems with Toolset Views, when its Content Templates were used. $post = $initial_current_post; setup_postdata( $initial_current_post );