* @license GNU General Public License v2 or later * @link http://themeisle.com */ global $wp_customize; $llorix_one_lite_latest_news_show = get_theme_mod( 'llorix_one_lite_latest_news_show' ); $llorix_one_lite_number_of_posts = get_option( 'posts_per_page' ); $args = array( 'post_type' => 'post', 'posts_per_page' => $llorix_one_lite_number_of_posts, 'order' => 'DESC','ignore_sticky_posts' => true ); /* If section is not disabled */ if ( isset( $llorix_one_lite_latest_news_show ) && $llorix_one_lite_latest_news_show != 1 ) { $the_query = new WP_Query( $args ); if ( $the_query->have_posts() ) { $llorix_one_lite_latest_news_title = get_theme_mod( 'llorix_one_lite_latest_news_title',esc_html__( 'Latest news','llorix-one-lite' ) ); if ( $llorix_one_lite_number_of_posts > 0 ) { ?>

' . esc_attr( $llorix_one_lite_latest_news_title ) . '

'; } elseif ( isset( $wp_customize ) ) { echo '

'; } ?>
    have_posts() ) : $the_query->the_post(); $i_latest_posts++; if ( ! wp_is_mobile() ) { if ( $i_latest_posts % 2 == 1 ) { echo '
  • '; } } else { echo '
  • '; } ?>
    '; } } else { echo '
  • '; } endwhile; wp_reset_postdata(); ?>
have_posts() ) { $llorix_one_lite_latest_news_title = get_theme_mod( 'llorix_one_lite_latest_news_title',esc_html__( 'Latest news','llorix-one-lite' ) ); if ( $llorix_one_lite_number_of_posts > 0 ) { ?>

' . esc_attr( $llorix_one_lite_latest_news_title ) . '

'; } elseif ( isset( $wp_customize ) ) { echo '

'; } ?>
    have_posts() ) : $the_query->the_post(); $i_latest_posts++; if ( ! wp_is_mobile() ) { if ( $i_latest_posts % 2 == 1 ) { echo '
  • '; } } else { echo '
  • '; } ?>
    '; } } else { echo '
  • '; } endwhile; wp_reset_postdata(); ?>