Your IP : 216.73.216.162


Current Path : /home/x/b/o/xbodynamge/namtation/wp-content/
Upload File :
Current File : /home/x/b/o/xbodynamge/namtation/wp-content/latest_news.php.tar

home/xbodynamge/crosstraining/wp-content/themes/zerif-lite/sections/latest_news.php000060400000012727151130516360025051 0ustar00<?php
/**
 * Latest news section
 *
 * @package zerif-lite
 */

$zerif_latestnews_show = get_theme_mod( 'zerif_latestnews_show' );

$zerif_total_posts = get_option( 'posts_per_page' ); /* number of latest posts to show */

if ( ! empty( $zerif_total_posts ) && ( $zerif_total_posts > 0 ) ) :

	zerif_before_latest_news_trigger();

	echo '<section class="latest-news ' . ( ( is_customize_preview() && ( ! isset( $zerif_latestnews_show ) || $zerif_latestnews_show == 1 ) ) ? ' zerif_hidden_if_not_customizer ' : '' ) . '" id="latestnews">';

	zerif_top_latest_news_trigger();

	echo '<div class="container">';

		/* SECTION HEADER */

		echo '<div class="section-header">';

			/* Title */
			zerif_latest_news_header_title_trigger();

			/* Subtitle */
			zerif_latest_news_header_subtitle_trigger();

		echo '</div><!-- END .section-header -->';

		echo '<div class="clear"></div>';

		echo '<div id="carousel-homepage-latestnews" class="carousel slide" data-ride="carousel">';

			/* Wrapper for slides */

			echo '<div class="carousel-inner" role="listbox">';

				$zerif_latest_loop = new WP_Query(
					apply_filters(
						'zerif_latest_news_parameters',
						array(
							'post_type'           => 'post',
							'posts_per_page'      => $zerif_total_posts,
							'order'               => 'DESC',
							'ignore_sticky_posts' => true,
						)
					)
				);

				$newSlideActive = '<div class="item active" role="option">';
				$newSlide       = '<div class="item">';
				$newSlideClose  = '<div class="clear"></div></div>';
				$i_latest_posts = 0;

	if ( $zerif_latest_loop->have_posts() ) :

		while ( $zerif_latest_loop->have_posts() ) :
			$zerif_latest_loop->the_post();

			$i_latest_posts++;

			if ( ! wp_is_mobile() ) {

				if ( $i_latest_posts == 1 ) {
					echo $newSlideActive;
				} elseif ( $i_latest_posts % 4 == 1 ) {
					echo $newSlide;
				}

					echo '<div class="col-sm-3 latestnews-box">';

						echo '<div class="latestnews-img">';

							echo '<a class="latestnews-img-a" href="' . esc_url( get_permalink() ) . '" title="' . esc_attr( get_the_title() ) . '">';

				if ( has_post_thumbnail() ) :
					the_post_thumbnail();
								else :
									echo '<img src="' . esc_url( get_template_directory_uri() ) . '/images/blank-latestposts.png" alt="' . esc_attr( get_the_title() ) . '" />';
								endif;

								echo '</a>';

								echo '</div>';

								echo '<div class="latesnews-content">';

								echo '<h3 class="latestnews-title"><a href="' . esc_url( get_permalink() ) . '" title="' . esc_attr( get_the_title() ) . '">' . wp_kses_post( get_the_title() ) . '</a></h3>';

								$ismore = ! empty( $post->post_content ) ? strpos( $post->post_content, '<!--more-->' ) : '';

								if ( ! empty( $ismore ) ) {
									the_content( esc_html__( 'Read more', 'zerif-lite' ) . ' <span class="sr-only">' . esc_html__( 'about ', 'zerif-lite' ) . get_the_title() );
								} else {
									the_excerpt();
								}

								echo '</div>';

								echo '</div><!-- .latestnews-box"> -->';

								/* after every four posts it must closing the '.item' */
								if ( $i_latest_posts % 4 == 0 ) {
									echo $newSlideClose;
								}
			} else {

				if ( $i_latest_posts == 1 ) {
					$active = 'active';
				} else {
					$active = '';
				}

							echo '<div class="item ' . $active . '" role="option">';
							echo '<div class="col-md-3 latestnews-box">';
							echo '<div class="latestnews-img">';
							echo '<a class="latestnews-img-a" href="' . get_permalink() . '" title="' . get_the_title() . '">';
				if ( has_post_thumbnail() ) :
					the_post_thumbnail();
						else :
							echo '<img src="' . esc_url( get_template_directory_uri() ) . '/images/blank-latestposts.png" alt="' . esc_attr( get_the_title() ) . '" />';
						endif;
						echo '</a>';
						echo '</div>';
						echo '<div class="latesnews-content">';
						echo '<h3 class="latestnews-title"><a href="' . esc_url( get_permalink() ) . '" title="' . esc_attr( get_the_title() ) . '">' . wp_kses_post( get_the_title() ) . '</a></h3>';

						if ( ! empty( $post->post_content ) ) {
							$ismore = strpos( $post->post_content, '<!--more-->' );
						}

						if ( $ismore ) {
							the_content( esc_html__( 'Read more', 'zerif-lite' ) . ' <span class="sr-only">' . esc_html__( 'about ', 'zerif-lite' ) . get_the_title() );
						} else {
							the_excerpt();
						}
						echo '</div>';
						echo '</div>';
						echo '</div>';
			}

		endwhile;

				endif;

	if ( ! wp_is_mobile() ) {

					// if there are less than 10 posts
		if ( $i_latest_posts % 4 != 0 ) {
			echo $newSlideClose;
		}
	}

				wp_reset_postdata();

				echo '</div><!-- .carousel-inner -->';

				/* Controls */
				echo apply_filters(
					'zerif_latest_news_left_arrow',
					'<a class="left carousel-control" href="#carousel-homepage-latestnews" role="button" data-slide="prev">
						<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
						<span class="sr-only">' . __( 'Previous', 'zerif-lite' ) . '</span>
					</a>'
				);
			echo apply_filters(
				'zerif_latest_news_right_arrow',
				'<a class="right carousel-control" href="#carousel-homepage-latestnews" role="button" data-slide="next">
						<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
						<span class="sr-only">' . __( 'Next', 'zerif-lite' ) . '</span>
					</a>'
			);
		echo '</div><!-- #carousel-homepage-latestnews -->';

	echo '</div><!-- .container -->';

	zerif_bottom_latest_news_trigger();

	echo '</section>';

	zerif_after_latest_news_trigger();

endif;
home/xbodynamge/www/wp-content/themes/responsiveboat/sections/latest_news.php000060400000014305151140002370023763 0ustar00<?php

$zerif_total_posts = get_option('posts_per_page'); /* number of latest posts to show */

if( !empty($zerif_total_posts) && ($zerif_total_posts > 0) ):

	if( function_exists('zerif_before_latest_news_trigger') ):
		zerif_before_latest_news_trigger();
	endif;

	$responsiveboat_parent_theme = get_template();
	
	/**********************************/
	/**********	Zerif PRO *************/
	/**********************************/
	
	if( !empty($responsiveboat_parent_theme) && ($responsiveboat_parent_theme == 'zerif-pro') ):
	
		global $wp_customize;
		
		$zerif_latest_news_show = get_theme_mod('zerif_latest_news_show');
				
		if( !empty($zerif_latest_news_show) ):
			echo '<section class="latest-news" id="latestnews">';	
		elseif ( isset( $wp_customize ) ):
			echo '<section class="latest-news zerif_hidden_if_not_customizer" id="latestnews">';	
		endif;
		
		zerif_top_latest_news_trigger();
	
		if( !empty($zerif_latest_news_show) || isset( $wp_customize ) ):
			
			/* SECTION HEADER */
			echo '<div class="section-header">';
			
				$zerif_latestnews_title = get_theme_mod('zerif_latestnews_title',__('LATEST NEWS','responsiveboat'));
				/* title */
				if( !empty($zerif_latestnews_title) ):
					echo '<h2 class="dark-text">' . $zerif_latestnews_title . '</h2>';
				elseif ( isset( $wp_customize ) ):
					echo '<h2 class="dark-text zerif_hidden_if_not_customizer"></h2>';
				endif;
				
				/* subtitle */
				$zerif_latestnews_subtitle = get_theme_mod('zerif_latestnews_subtitle',__('Add a subtitle in Customizer, "Latest news section"','responsiveboat'));
				if( !empty($zerif_latestnews_subtitle) ):
					echo '<h6 class="dark-text">'.$zerif_latestnews_subtitle.'</h6>';
				elseif ( isset( $wp_customize ) ):
					echo '<h6 class="dark-text zerif_hidden_if_not_customizer"></h6>';
				endif;
				
			echo '</div><!-- END .section-header -->';
			echo '<div class="clear"></div>';
				
			$zerif_latest_loop = new WP_Query( array( 'post_type' => 'post', 'posts_per_page' => 4, 'order' => 'DESC','ignore_sticky_posts' => true ) );
			if( $zerif_latest_loop->have_posts() ):

				echo '<div class="rb-latest-news-container">';

					while ( $zerif_latest_loop->have_posts() ) : $zerif_latest_loop->the_post();

						if ( has_post_thumbnail() ) :
							echo '<div class="rb-latest-news">';
						else:
							echo '<div class="rb-latest-news rb-latest-news-content-open">';
						endif;

							echo '<div class="rb-latest-news-image-holder">';

								echo '<a href="'.get_permalink().'">';

									echo '<span class="rb-latest-news-image">';

										if ( has_post_thumbnail() ) :
											the_post_thumbnail('rb_latest_news_photo');
										else:
											echo responsiveboat_get_first_image_from_post();
										endif;

									echo '</span>';

								echo '</a>';

								echo '<span class="rb-latest-news-content">';
									echo '<div class="rb-latest-news-content-outer">';
										echo '<div class="rb-latest-news-content-inner">';
											echo '<h3>'.get_the_title().'</h3>';
											echo '<a href="'.get_permalink().'" class="rb-latest-news-read-more">'.__('Read full article','responsiveboat').'</a>';
										echo '</div>';
									echo '</div>';
								echo '</span>';

							echo '</div><!-- .rb-latest-news-image-holder -->';

						echo '</div><!-- .rb-latest-news -->';

					endwhile;
					
				echo '</div><!-- .rb-latest-news-container -->';	
				
				wp_reset_postdata();

				endif;	
			
				zerif_bottom_latest_news_trigger();
				
			echo '</section>';
		endif;
	
	/*********************************************/
    /*******	Other theme then Zerif PRO *******/
    /*********************************************/	
	else:

		echo '<section class="latest-news" id="latestnews">';
		
			if( function_exists('zerif_top_latest_news_trigger') ):
				zerif_top_latest_news_trigger();
			endif;	

			/* SECTION HEADER */

			echo '<div class="section-header">';

				$zerif_latestnews_title = get_theme_mod('zerif_latestnews_title');

				/* title */
				if( !empty($zerif_latestnews_title) ):
					echo '<h2 class="dark-text">' . $zerif_latestnews_title . '</h2>';
				else:
					echo '<h2 class="dark-text">' . __('Latest news','responsiveboat') . '</h2>';
				endif;

				/* subtitle */
				$zerif_latestnews_subtitle = get_theme_mod('zerif_latestnews_subtitle');

				if( !empty($zerif_latestnews_subtitle) ):
					echo '<h6 class="dark-text">'.$zerif_latestnews_subtitle.'</h6>';
				endif;

			echo '</div><!-- END .section-header -->';

			echo '<div class="clear"></div>';

			$zerif_latest_loop = new WP_Query( array( 'post_type' => 'post', 'posts_per_page' => 4, 'order' => 'DESC','ignore_sticky_posts' => true ) );
			if( $zerif_latest_loop->have_posts() ):

				echo '<div class="rb-latest-news-container">';

					while ( $zerif_latest_loop->have_posts() ) : $zerif_latest_loop->the_post();

					if ( has_post_thumbnail() ) :
						echo '<div class="rb-latest-news">';
					else:
						echo '<div class="rb-latest-news rb-latest-news-content-open">';
					endif;

						echo '<div class="rb-latest-news-image-holder">';

							echo '<a href="'.get_permalink().'">';

								echo '<span class="rb-latest-news-image">';

									if ( has_post_thumbnail() ) :
										the_post_thumbnail('rb_latest_news_photo');
									else:
										echo responsiveboat_get_first_image_from_post();
									endif;

								echo '</span>';

							echo '</a>';

							echo '<span class="rb-latest-news-content">';
								echo '<div class="rb-latest-news-content-outer">';
									echo '<div class="rb-latest-news-content-inner">';
										echo '<h3>'.get_the_title().'</h3>';
										echo '<a href="'.get_permalink().'" class="rb-latest-news-read-more">'.__('Read full article','responsiveboat').'</a>';
									echo '</div>';
								echo '</div>';
							echo '</span>';

						echo '</div><!-- .rb-latest-news-image-holder -->';

					echo '</div><!-- .rb-latest-news -->';

					endwhile;
					
					wp_reset_postdata();

				echo '</div><!-- .rb-latest-news-container -->';
				
			endif;	

			if( function_exists('zerif_bottom_latest_news_trigger') ):
				zerif_bottom_latest_news_trigger();
			endif;

		echo '</section>';
		
	endif;	
	
	if( function_exists('zerif_after_latest_news_trigger') ):
		zerif_after_latest_news_trigger();
	endif;	
	
endif; ?>home/xbodynamge/www/wp-content/themes/zerif-lite/sections/latest_news.php000064400000012710151141135150023000 0ustar00<?php
/**
 * Latest news section
 *
 * @package zerif-lite
 */

$zerif_latestnews_show = get_theme_mod( 'zerif_latestnews_show' );

$zerif_total_posts = get_option( 'posts_per_page' ); /* number of latest posts to show */

if ( ! empty( $zerif_total_posts ) && ( $zerif_total_posts > 0 ) ) :

	zerif_before_latest_news_trigger();

	echo '<section class="latest-news ' . ( ( is_customize_preview() && ( ! isset( $zerif_latestnews_show ) || $zerif_latestnews_show == 1 ) ) ? ' zerif_hidden_if_not_customizer ' : '' ) . '" id="latestnews">';

	zerif_top_latest_news_trigger();

	echo '<div class="container">';

		/* SECTION HEADER */

		echo '<div class="section-header">';

			/* Title */
			zerif_latest_news_header_title_trigger();

			/* Subtitle */
			zerif_latest_news_header_subtitle_trigger();

		echo '</div><!-- END .section-header -->';

		echo '<div class="clear"></div>';

		echo '<div id="carousel-homepage-latestnews" class="carousel slide" data-ride="carousel">';

			/* Wrapper for slides */

			echo '<div class="carousel-inner" role="listbox">';

				$zerif_latest_loop = new WP_Query(
					apply_filters(
						'zerif_latest_news_parameters', array(
							'post_type'           => 'post',
							'posts_per_page'      => $zerif_total_posts,
							'order'               => 'DESC',
							'ignore_sticky_posts' => true,
						)
					)
				);

				$newSlideActive = '<div class="item active" role="option">';
				$newSlide       = '<div class="item">';
				$newSlideClose  = '<div class="clear"></div></div>';
				$i_latest_posts = 0;

	if ( $zerif_latest_loop->have_posts() ) :

		while ( $zerif_latest_loop->have_posts() ) :
			$zerif_latest_loop->the_post();

			$i_latest_posts++;

			if ( ! wp_is_mobile() ) {

				if ( $i_latest_posts == 1 ) {
					echo $newSlideActive;
				} elseif ( $i_latest_posts % 4 == 1 ) {
					echo $newSlide;
				}

					echo '<div class="col-sm-3 latestnews-box">';

						echo '<div class="latestnews-img">';

							echo '<a class="latestnews-img-a" href="' . esc_url( get_permalink() ) . '" title="' . esc_attr( get_the_title() ) . '">';

				if ( has_post_thumbnail() ) :
					the_post_thumbnail();
								else :
									echo '<img src="' . esc_url( get_template_directory_uri() ) . '/images/blank-latestposts.png" alt="' . esc_attr( get_the_title() ) . '" />';
								endif;

								echo '</a>';

								echo '</div>';

								echo '<div class="latesnews-content">';

								echo '<h3 class="latestnews-title"><a href="' . esc_url( get_permalink() ) . '" title="' . esc_attr( get_the_title() ) . '">' . wp_kses_post( get_the_title() ) . '</a></h3>';

								$ismore = ! empty( $post->post_content ) ? strpos( $post->post_content, '<!--more-->' ) : '';

								if ( ! empty( $ismore ) ) {
									the_content( esc_html__( 'Read more', 'zerif-lite' ) . ' <span class="sr-only">' . esc_html__( 'about ', 'zerif-lite' ) . get_the_title() );
								} else {
									the_excerpt();
								}

								echo '</div>';

								echo '</div><!-- .latestnews-box"> -->';

								/* after every four posts it must closing the '.item' */
								if ( $i_latest_posts % 4 == 0 ) {
									echo $newSlideClose;
								}
			} else {

				if ( $i_latest_posts == 1 ) {
					$active = 'active';
				} else {
					$active = '';
				}

							echo '<div class="item ' . $active . '" role="option">';
							echo '<div class="col-md-3 latestnews-box">';
							echo '<div class="latestnews-img">';
							echo '<a class="latestnews-img-a" href="' . get_permalink() . '" title="' . get_the_title() . '">';
				if ( has_post_thumbnail() ) :
					the_post_thumbnail();
						else :
							echo '<img src="' . esc_url( get_template_directory_uri() ) . '/images/blank-latestposts.png" alt="' . esc_attr( get_the_title() ) . '" />';
						endif;
						echo '</a>';
						echo '</div>';
						echo '<div class="latesnews-content">';
						echo '<h3 class="latestnews-title"><a href="' . esc_url( get_permalink() ) . '" title="' . esc_attr( get_the_title() ) . '">' . wp_kses_post( get_the_title() ) . '</a></h3>';

						if ( ! empty( $post->post_content ) ) {
							$ismore = strpos( $post->post_content, '<!--more-->' );
						}

						if ( $ismore ) {
							the_content( esc_html__( 'Read more', 'zerif-lite' ) . ' <span class="sr-only">' . esc_html__( 'about ', 'zerif-lite' ) . get_the_title() );
						} else {
							the_excerpt();
						}
						echo '</div>';
						echo '</div>';
						echo '</div>';
			}

		endwhile;

				endif;

	if ( ! wp_is_mobile() ) {

					// if there are less than 10 posts
		if ( $i_latest_posts % 4 != 0 ) {
			echo $newSlideClose;
		}
	}

				wp_reset_postdata();

				echo '</div><!-- .carousel-inner -->';

				/* Controls */
				echo apply_filters(
					'zerif_latest_news_left_arrow', '<a class="left carousel-control" href="#carousel-homepage-latestnews" role="button" data-slide="prev">
						<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
						<span class="sr-only">' . __( 'Previous', 'zerif-lite' ) . '</span>
					</a>'
				);
			echo apply_filters(
				'zerif_latest_news_right_arrow', '<a class="right carousel-control" href="#carousel-homepage-latestnews" role="button" data-slide="next">
						<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
						<span class="sr-only">' . __( 'Next', 'zerif-lite' ) . '</span>
					</a>'
			);
		echo '</div><!-- #carousel-homepage-latestnews -->';

	echo '</div><!-- .container -->';

	zerif_bottom_latest_news_trigger();

	echo '</section>';

	zerif_after_latest_news_trigger();

endif;
home/xbodynamge/dev/wp-content/themes/zerif-lite/sections/latest_news.php000064400000012727151146260540022751 0ustar00<?php
/**
 * Latest news section
 *
 * @package zerif-lite
 */

$zerif_latestnews_show = get_theme_mod( 'zerif_latestnews_show' );

$zerif_total_posts = get_option( 'posts_per_page' ); /* number of latest posts to show */

if ( ! empty( $zerif_total_posts ) && ( $zerif_total_posts > 0 ) ) :

	zerif_before_latest_news_trigger();

	echo '<section class="latest-news ' . ( ( is_customize_preview() && ( ! isset( $zerif_latestnews_show ) || $zerif_latestnews_show == 1 ) ) ? ' zerif_hidden_if_not_customizer ' : '' ) . '" id="latestnews">';

	zerif_top_latest_news_trigger();

	echo '<div class="container">';

		/* SECTION HEADER */

		echo '<div class="section-header">';

			/* Title */
			zerif_latest_news_header_title_trigger();

			/* Subtitle */
			zerif_latest_news_header_subtitle_trigger();

		echo '</div><!-- END .section-header -->';

		echo '<div class="clear"></div>';

		echo '<div id="carousel-homepage-latestnews" class="carousel slide" data-ride="carousel">';

			/* Wrapper for slides */

			echo '<div class="carousel-inner" role="listbox">';

				$zerif_latest_loop = new WP_Query(
					apply_filters(
						'zerif_latest_news_parameters',
						array(
							'post_type'           => 'post',
							'posts_per_page'      => $zerif_total_posts,
							'order'               => 'DESC',
							'ignore_sticky_posts' => true,
						)
					)
				);

				$newSlideActive = '<div class="item active" role="option">';
				$newSlide       = '<div class="item">';
				$newSlideClose  = '<div class="clear"></div></div>';
				$i_latest_posts = 0;

	if ( $zerif_latest_loop->have_posts() ) :

		while ( $zerif_latest_loop->have_posts() ) :
			$zerif_latest_loop->the_post();

			$i_latest_posts++;

			if ( ! wp_is_mobile() ) {

				if ( $i_latest_posts == 1 ) {
					echo $newSlideActive;
				} elseif ( $i_latest_posts % 4 == 1 ) {
					echo $newSlide;
				}

					echo '<div class="col-sm-3 latestnews-box">';

						echo '<div class="latestnews-img">';

							echo '<a class="latestnews-img-a" href="' . esc_url( get_permalink() ) . '" title="' . esc_attr( get_the_title() ) . '">';

				if ( has_post_thumbnail() ) :
					the_post_thumbnail();
								else :
									echo '<img src="' . esc_url( get_template_directory_uri() ) . '/images/blank-latestposts.png" alt="' . esc_attr( get_the_title() ) . '" />';
								endif;

								echo '</a>';

								echo '</div>';

								echo '<div class="latesnews-content">';

								echo '<h3 class="latestnews-title"><a href="' . esc_url( get_permalink() ) . '" title="' . esc_attr( get_the_title() ) . '">' . wp_kses_post( get_the_title() ) . '</a></h3>';

								$ismore = ! empty( $post->post_content ) ? strpos( $post->post_content, '<!--more-->' ) : '';

								if ( ! empty( $ismore ) ) {
									the_content( esc_html__( 'Read more', 'zerif-lite' ) . ' <span class="sr-only">' . esc_html__( 'about ', 'zerif-lite' ) . get_the_title() );
								} else {
									the_excerpt();
								}

								echo '</div>';

								echo '</div><!-- .latestnews-box"> -->';

								/* after every four posts it must closing the '.item' */
								if ( $i_latest_posts % 4 == 0 ) {
									echo $newSlideClose;
								}
			} else {

				if ( $i_latest_posts == 1 ) {
					$active = 'active';
				} else {
					$active = '';
				}

							echo '<div class="item ' . $active . '" role="option">';
							echo '<div class="col-md-3 latestnews-box">';
							echo '<div class="latestnews-img">';
							echo '<a class="latestnews-img-a" href="' . get_permalink() . '" title="' . get_the_title() . '">';
				if ( has_post_thumbnail() ) :
					the_post_thumbnail();
						else :
							echo '<img src="' . esc_url( get_template_directory_uri() ) . '/images/blank-latestposts.png" alt="' . esc_attr( get_the_title() ) . '" />';
						endif;
						echo '</a>';
						echo '</div>';
						echo '<div class="latesnews-content">';
						echo '<h3 class="latestnews-title"><a href="' . esc_url( get_permalink() ) . '" title="' . esc_attr( get_the_title() ) . '">' . wp_kses_post( get_the_title() ) . '</a></h3>';

						if ( ! empty( $post->post_content ) ) {
							$ismore = strpos( $post->post_content, '<!--more-->' );
						}

						if ( $ismore ) {
							the_content( esc_html__( 'Read more', 'zerif-lite' ) . ' <span class="sr-only">' . esc_html__( 'about ', 'zerif-lite' ) . get_the_title() );
						} else {
							the_excerpt();
						}
						echo '</div>';
						echo '</div>';
						echo '</div>';
			}

		endwhile;

				endif;

	if ( ! wp_is_mobile() ) {

					// if there are less than 10 posts
		if ( $i_latest_posts % 4 != 0 ) {
			echo $newSlideClose;
		}
	}

				wp_reset_postdata();

				echo '</div><!-- .carousel-inner -->';

				/* Controls */
				echo apply_filters(
					'zerif_latest_news_left_arrow',
					'<a class="left carousel-control" href="#carousel-homepage-latestnews" role="button" data-slide="prev">
						<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
						<span class="sr-only">' . __( 'Previous', 'zerif-lite' ) . '</span>
					</a>'
				);
			echo apply_filters(
				'zerif_latest_news_right_arrow',
				'<a class="right carousel-control" href="#carousel-homepage-latestnews" role="button" data-slide="next">
						<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
						<span class="sr-only">' . __( 'Next', 'zerif-lite' ) . '</span>
					</a>'
			);
		echo '</div><!-- #carousel-homepage-latestnews -->';

	echo '</div><!-- .container -->';

	zerif_bottom_latest_news_trigger();

	echo '</section>';

	zerif_after_latest_news_trigger();

endif;
home/xbodynamge/lebauwcentre/wp-content/themes/zerif-lite/sections/latest_news.php000064400000012727151146511410024646 0ustar00<?php
/**
 * Latest news section
 *
 * @package zerif-lite
 */

$zerif_latestnews_show = get_theme_mod( 'zerif_latestnews_show' );

$zerif_total_posts = get_option( 'posts_per_page' ); /* number of latest posts to show */

if ( ! empty( $zerif_total_posts ) && ( $zerif_total_posts > 0 ) ) :

	zerif_before_latest_news_trigger();

	echo '<section class="latest-news ' . ( ( is_customize_preview() && ( ! isset( $zerif_latestnews_show ) || $zerif_latestnews_show == 1 ) ) ? ' zerif_hidden_if_not_customizer ' : '' ) . '" id="latestnews">';

	zerif_top_latest_news_trigger();

	echo '<div class="container">';

		/* SECTION HEADER */

		echo '<div class="section-header">';

			/* Title */
			zerif_latest_news_header_title_trigger();

			/* Subtitle */
			zerif_latest_news_header_subtitle_trigger();

		echo '</div><!-- END .section-header -->';

		echo '<div class="clear"></div>';

		echo '<div id="carousel-homepage-latestnews" class="carousel slide" data-ride="carousel">';

			/* Wrapper for slides */

			echo '<div class="carousel-inner" role="listbox">';

				$zerif_latest_loop = new WP_Query(
					apply_filters(
						'zerif_latest_news_parameters',
						array(
							'post_type'           => 'post',
							'posts_per_page'      => $zerif_total_posts,
							'order'               => 'DESC',
							'ignore_sticky_posts' => true,
						)
					)
				);

				$newSlideActive = '<div class="item active" role="option">';
				$newSlide       = '<div class="item">';
				$newSlideClose  = '<div class="clear"></div></div>';
				$i_latest_posts = 0;

	if ( $zerif_latest_loop->have_posts() ) :

		while ( $zerif_latest_loop->have_posts() ) :
			$zerif_latest_loop->the_post();

			$i_latest_posts++;

			if ( ! wp_is_mobile() ) {

				if ( $i_latest_posts == 1 ) {
					echo $newSlideActive;
				} elseif ( $i_latest_posts % 4 == 1 ) {
					echo $newSlide;
				}

					echo '<div class="col-sm-3 latestnews-box">';

						echo '<div class="latestnews-img">';

							echo '<a class="latestnews-img-a" href="' . esc_url( get_permalink() ) . '" title="' . esc_attr( get_the_title() ) . '">';

				if ( has_post_thumbnail() ) :
					the_post_thumbnail();
								else :
									echo '<img src="' . esc_url( get_template_directory_uri() ) . '/images/blank-latestposts.png" alt="' . esc_attr( get_the_title() ) . '" />';
								endif;

								echo '</a>';

								echo '</div>';

								echo '<div class="latesnews-content">';

								echo '<h3 class="latestnews-title"><a href="' . esc_url( get_permalink() ) . '" title="' . esc_attr( get_the_title() ) . '">' . wp_kses_post( get_the_title() ) . '</a></h3>';

								$ismore = ! empty( $post->post_content ) ? strpos( $post->post_content, '<!--more-->' ) : '';

								if ( ! empty( $ismore ) ) {
									the_content( esc_html__( 'Read more', 'zerif-lite' ) . ' <span class="sr-only">' . esc_html__( 'about ', 'zerif-lite' ) . get_the_title() );
								} else {
									the_excerpt();
								}

								echo '</div>';

								echo '</div><!-- .latestnews-box"> -->';

								/* after every four posts it must closing the '.item' */
								if ( $i_latest_posts % 4 == 0 ) {
									echo $newSlideClose;
								}
			} else {

				if ( $i_latest_posts == 1 ) {
					$active = 'active';
				} else {
					$active = '';
				}

							echo '<div class="item ' . $active . '" role="option">';
							echo '<div class="col-md-3 latestnews-box">';
							echo '<div class="latestnews-img">';
							echo '<a class="latestnews-img-a" href="' . get_permalink() . '" title="' . get_the_title() . '">';
				if ( has_post_thumbnail() ) :
					the_post_thumbnail();
						else :
							echo '<img src="' . esc_url( get_template_directory_uri() ) . '/images/blank-latestposts.png" alt="' . esc_attr( get_the_title() ) . '" />';
						endif;
						echo '</a>';
						echo '</div>';
						echo '<div class="latesnews-content">';
						echo '<h3 class="latestnews-title"><a href="' . esc_url( get_permalink() ) . '" title="' . esc_attr( get_the_title() ) . '">' . wp_kses_post( get_the_title() ) . '</a></h3>';

						if ( ! empty( $post->post_content ) ) {
							$ismore = strpos( $post->post_content, '<!--more-->' );
						}

						if ( $ismore ) {
							the_content( esc_html__( 'Read more', 'zerif-lite' ) . ' <span class="sr-only">' . esc_html__( 'about ', 'zerif-lite' ) . get_the_title() );
						} else {
							the_excerpt();
						}
						echo '</div>';
						echo '</div>';
						echo '</div>';
			}

		endwhile;

				endif;

	if ( ! wp_is_mobile() ) {

					// if there are less than 10 posts
		if ( $i_latest_posts % 4 != 0 ) {
			echo $newSlideClose;
		}
	}

				wp_reset_postdata();

				echo '</div><!-- .carousel-inner -->';

				/* Controls */
				echo apply_filters(
					'zerif_latest_news_left_arrow',
					'<a class="left carousel-control" href="#carousel-homepage-latestnews" role="button" data-slide="prev">
						<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
						<span class="sr-only">' . __( 'Previous', 'zerif-lite' ) . '</span>
					</a>'
				);
			echo apply_filters(
				'zerif_latest_news_right_arrow',
				'<a class="right carousel-control" href="#carousel-homepage-latestnews" role="button" data-slide="next">
						<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
						<span class="sr-only">' . __( 'Next', 'zerif-lite' ) . '</span>
					</a>'
			);
		echo '</div><!-- #carousel-homepage-latestnews -->';

	echo '</div><!-- .container -->';

	zerif_bottom_latest_news_trigger();

	echo '</section>';

	zerif_after_latest_news_trigger();

endif;
home/xbodynamge/namtation/wp-content/themes/zerif-lite/sections/latest_news.php000064400000012727151146706170024171 0ustar00<?php
/**
 * Latest news section
 *
 * @package zerif-lite
 */

$zerif_latestnews_show = get_theme_mod( 'zerif_latestnews_show' );

$zerif_total_posts = get_option( 'posts_per_page' ); /* number of latest posts to show */

if ( ! empty( $zerif_total_posts ) && ( $zerif_total_posts > 0 ) ) :

	zerif_before_latest_news_trigger();

	echo '<section class="latest-news ' . ( ( is_customize_preview() && ( ! isset( $zerif_latestnews_show ) || $zerif_latestnews_show == 1 ) ) ? ' zerif_hidden_if_not_customizer ' : '' ) . '" id="latestnews">';

	zerif_top_latest_news_trigger();

	echo '<div class="container">';

		/* SECTION HEADER */

		echo '<div class="section-header">';

			/* Title */
			zerif_latest_news_header_title_trigger();

			/* Subtitle */
			zerif_latest_news_header_subtitle_trigger();

		echo '</div><!-- END .section-header -->';

		echo '<div class="clear"></div>';

		echo '<div id="carousel-homepage-latestnews" class="carousel slide" data-ride="carousel">';

			/* Wrapper for slides */

			echo '<div class="carousel-inner" role="listbox">';

				$zerif_latest_loop = new WP_Query(
					apply_filters(
						'zerif_latest_news_parameters',
						array(
							'post_type'           => 'post',
							'posts_per_page'      => $zerif_total_posts,
							'order'               => 'DESC',
							'ignore_sticky_posts' => true,
						)
					)
				);

				$newSlideActive = '<div class="item active" role="option">';
				$newSlide       = '<div class="item">';
				$newSlideClose  = '<div class="clear"></div></div>';
				$i_latest_posts = 0;

	if ( $zerif_latest_loop->have_posts() ) :

		while ( $zerif_latest_loop->have_posts() ) :
			$zerif_latest_loop->the_post();

			$i_latest_posts++;

			if ( ! wp_is_mobile() ) {

				if ( $i_latest_posts == 1 ) {
					echo $newSlideActive;
				} elseif ( $i_latest_posts % 4 == 1 ) {
					echo $newSlide;
				}

					echo '<div class="col-sm-3 latestnews-box">';

						echo '<div class="latestnews-img">';

							echo '<a class="latestnews-img-a" href="' . esc_url( get_permalink() ) . '" title="' . esc_attr( get_the_title() ) . '">';

				if ( has_post_thumbnail() ) :
					the_post_thumbnail();
								else :
									echo '<img src="' . esc_url( get_template_directory_uri() ) . '/images/blank-latestposts.png" alt="' . esc_attr( get_the_title() ) . '" />';
								endif;

								echo '</a>';

								echo '</div>';

								echo '<div class="latesnews-content">';

								echo '<h3 class="latestnews-title"><a href="' . esc_url( get_permalink() ) . '" title="' . esc_attr( get_the_title() ) . '">' . wp_kses_post( get_the_title() ) . '</a></h3>';

								$ismore = ! empty( $post->post_content ) ? strpos( $post->post_content, '<!--more-->' ) : '';

								if ( ! empty( $ismore ) ) {
									the_content( esc_html__( 'Read more', 'zerif-lite' ) . ' <span class="sr-only">' . esc_html__( 'about ', 'zerif-lite' ) . get_the_title() );
								} else {
									the_excerpt();
								}

								echo '</div>';

								echo '</div><!-- .latestnews-box"> -->';

								/* after every four posts it must closing the '.item' */
								if ( $i_latest_posts % 4 == 0 ) {
									echo $newSlideClose;
								}
			} else {

				if ( $i_latest_posts == 1 ) {
					$active = 'active';
				} else {
					$active = '';
				}

							echo '<div class="item ' . $active . '" role="option">';
							echo '<div class="col-md-3 latestnews-box">';
							echo '<div class="latestnews-img">';
							echo '<a class="latestnews-img-a" href="' . get_permalink() . '" title="' . get_the_title() . '">';
				if ( has_post_thumbnail() ) :
					the_post_thumbnail();
						else :
							echo '<img src="' . esc_url( get_template_directory_uri() ) . '/images/blank-latestposts.png" alt="' . esc_attr( get_the_title() ) . '" />';
						endif;
						echo '</a>';
						echo '</div>';
						echo '<div class="latesnews-content">';
						echo '<h3 class="latestnews-title"><a href="' . esc_url( get_permalink() ) . '" title="' . esc_attr( get_the_title() ) . '">' . wp_kses_post( get_the_title() ) . '</a></h3>';

						if ( ! empty( $post->post_content ) ) {
							$ismore = strpos( $post->post_content, '<!--more-->' );
						}

						if ( $ismore ) {
							the_content( esc_html__( 'Read more', 'zerif-lite' ) . ' <span class="sr-only">' . esc_html__( 'about ', 'zerif-lite' ) . get_the_title() );
						} else {
							the_excerpt();
						}
						echo '</div>';
						echo '</div>';
						echo '</div>';
			}

		endwhile;

				endif;

	if ( ! wp_is_mobile() ) {

					// if there are less than 10 posts
		if ( $i_latest_posts % 4 != 0 ) {
			echo $newSlideClose;
		}
	}

				wp_reset_postdata();

				echo '</div><!-- .carousel-inner -->';

				/* Controls */
				echo apply_filters(
					'zerif_latest_news_left_arrow',
					'<a class="left carousel-control" href="#carousel-homepage-latestnews" role="button" data-slide="prev">
						<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
						<span class="sr-only">' . __( 'Previous', 'zerif-lite' ) . '</span>
					</a>'
				);
			echo apply_filters(
				'zerif_latest_news_right_arrow',
				'<a class="right carousel-control" href="#carousel-homepage-latestnews" role="button" data-slide="next">
						<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
						<span class="sr-only">' . __( 'Next', 'zerif-lite' ) . '</span>
					</a>'
			);
		echo '</div><!-- #carousel-homepage-latestnews -->';

	echo '</div><!-- .container -->';

	zerif_bottom_latest_news_trigger();

	echo '</section>';

	zerif_after_latest_news_trigger();

endif;