'page', 'page_id' => $page_id, 'posts_per_page' => 1, ); // Run The Loop. $query = new WP_Query( $args ); if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); $page_post['title'] = get_the_title(); $page_post['excerpt'] = travel_ultimate_trim_content( 50 ); if ( ! empty( $page_post ) ) { // Push to the main array. array_push( $content, $page_post ); } endwhile; endif; wp_reset_postdata(); if ( ! empty( $content ) ) { $input = $content; } return $input; } endif; // about section content details. add_filter( 'travel_ultimate_filter_about_section_details', 'travel_ultimate_get_about_section_details' ); if ( ! function_exists( 'travel_ultimate_get_tour_section_details' ) ) : /** * about section details. * * @since Travel Ultimate 1.0.0 * @param array $input about section details. */ function travel_ultimate_get_tour_section_details( $input ) { $options = travel_ultimate_get_theme_options(); // Content type. $tour_content_type = $options['tour_content_type']; $content = array(); switch ( $tour_content_type ) { case 'cat': $cat = array(); for ( $i = 1; $i <= 4; $i++ ) { if ( ! empty( $options['tour_cat_' . $i] ) ){ $cat_id = $options['tour_cat_' . $i]; $term = get_term( $cat_id, 'category' ); $cat['count'] = $term->count; $cat['name'] = $term->name; $cat['url'] = get_term_link( $cat_id, 'category' ); } if ( ! empty( $cat ) ) { // Push to the main array. array_push( $content, $cat ); } } break; case 'trip-types': $trip_type = array(); for ( $i = 1; $i <= 4; $i++ ) { if ( ! empty( $options['tour_trip_' . $i] ) ){ $trip_id = $options['tour_trip_' . $i]; $term = get_term( $trip_id, 'itinerary_types' ); $trip_type['count'] = $term->count; $trip_type['name'] = $term->name; $trip_type['url'] = get_term_link( $trip_id, 'itinerary_types' ); if ( ! empty( $trip_type ) ) { array_push( $content, $trip_type ); } } } break; default: break; } if ( ! empty( $content ) ) { $input = $content; } return $input; } endif; // about section content details. add_filter( 'travel_ultimate_filter_tour_section_details', 'travel_ultimate_get_tour_section_details' ); if ( ! function_exists( 'travel_ultimate_render_about_section' ) ) : /** * Start about section * * @return string about content * @since Travel Ultimate 1.0.0 * */ function travel_ultimate_render_about_section( $content_details = array(), $tour_details = array() ) { $options = travel_ultimate_get_theme_options(); if ( empty( $content_details ) && empty( $tour_details ) ) { return; } ?>