'page', 'page_id' => absint( $id ), ); } // Fetch posts. if ( ! empty( $args ) ) { $posts = get_posts( $args ); foreach ( $posts as $key => $post ) { $page_id = $post->ID; $content[0]['sub_title'] = ''; $content[0]['title'] = get_the_title( $page_id ); $content[0]['excerpt'] = academic_trim_content( 110, $post ); $content[0]['alt'] = get_the_title( $page_id ); $content[0]['url'] = get_permalink( $page_id ); $content[0]['btn_label'] = ! empty( $options['read_more_text'] ) ? $options['read_more_text'] : esc_html__( 'Read More', 'academic' ); $content[0]['btn_target'] = ''; if ( has_post_thumbnail( $page_id ) ) { $img_array = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'large' ); } $content[0]['img_array'] = ''; if ( isset( $img_array ) ) { $content[0]['img_array'] = $img_array[0]; } } } if ( empty( $content[0][1]['statistics_title'] ) && empty( $content[0][1]['statistics_value'] ) ){ $input = ""; } if ( ! empty( $content ) ) { $input = $content; } return $input; } endif; // about section content details. add_filter( 'academic_filter_about_section_details', 'academic_get_about_section_details' ); if ( ! function_exists( 'academic_render_about_section' ) ) : /** * Start about section * * @return string about content * @since Academic 0.3 * */ function academic_render_about_section( $content_details = array() ) { $options = academic_get_theme_options(); if ( empty( $content_details ) ) { return; } if ( $content_details[0]['img_array'] ) { $class = 'two'; } else { $class = 'one'; } ?>