function ts_portfolio_item_func($atts, $content = null)
{
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'id' => 0), $atts));
    global $post;
    $html = '';
    $new_post = null;
    if (!empty($id)) {
        $new_post = get_post($id);
    }
    if ($new_post) {
        $post = $new_post;
        setup_postdata($post);
        $image = '';
        $slider = '';
        $portfolio_slider = ts_get_post_opt('portfolio_slider');
        if (is_array($portfolio_slider) && count($portfolio_slider) > 0) {
            foreach ($portfolio_slider as $slide) {
                if (!empty($slide['image'])) {
                    $image = theme_thumb($slide['image'], 370, 270, 'c');
                }
                $slider .= ' 
					<div class="col-sm-12 col-md-12">
					  <img src="' . esc_url($image) . '" alt="" title="">
					</div>';
            }
        }
        if (!empty($slider)) {
            $gallery = '
				<div class="carousel-box load" data-carousel-pagination="true" data-carousel-nav="false" data-carousel-one="true">
					<div class="row">
						<div class="carousel">' . $slider . '</div>
					</div>
					<div class="clearfix"></div>
					<div class="pagination switches"></div>
				</div>';
        } else {
            $gallery = '<img src="' . esc_url(get_xv_thumbnail(370, 270)) . '" class="single-image" />';
        }
        $html = '
			<div class="work-single row ' . ts_get_animation_class($animation) . '" ' . ts_get_animation_data_class($animation_delay, $animation_iteration) . '>
				<div class="images-box col-sm-5 col-md-4">
					' . $gallery . '
				</div>

				<div class="work-description col-sm-7 col-md-8">
				  <h3 class="title">' . get_the_title() . '</h3>
				  <div class="type">' . xv_get_field('client') . '</div>

				  <div>
					' . apply_filters('the_content', get_the_content()) . '
					<div class="tags"><b>' . __('Categories', 'progressive') . ': </b>' . strip_tags(get_the_term_list($post->ID, 'portfolio_category', '', ', ')) . '</div>
				  </div>
				</div>
				<div class="clearfix"></div>
			  </div>';
        wp_reset_postdata();
    }
    return $html;
}
Example #2
0
function ts_post_list_func($atts, $content = null)
{
    global $post;
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'category' => '', 'limit' => 1, 'carousel_pagination' => 'yes', 'carousel_navigation' => 'yes', 'image_align' => 'left'), $atts));
    if (empty($limit)) {
        $limit = 1;
    }
    $html = '';
    $args = array('numberposts' => "", 'posts_per_page' => $limit, 'offset' => 0, 'cat' => $category, 'orderby' => 'date', 'order' => 'DESC', 'include' => '', 'exclude' => '', 'meta_key' => '', 'meta_value' => '', 'post_type' => 'post', 'post_mime_type' => '', 'post_parent' => '', 'paged' => 1, 'post_status' => 'publish');
    ob_start();
    $the_query = new WP_Query($args);
    $html = '';
    if ($the_query->have_posts()) {
        while ($the_query->have_posts()) {
            $the_query->the_post();
            $slider = '';
            $post_gallery = ts_get_post_opt('post_gallery');
            if (is_array($post_gallery) && count($post_gallery) > 0) {
                foreach ($post_gallery as $slide) {
                    $image = theme_thumb($slide['image'], 370, 270, 'c');
                    if (!empty($image)) {
                        $slider .= '<img src="' . esc_url($image) . '" alt="" title="" />';
                    }
                }
            }
            ?>
			<div class="bottom-padding <?php 
            echo ts_get_animation_class($animation);
            ?>
" <?php 
            echo ts_get_animation_data_class($animation_delay, $animation_iteration);
            ?>
>
				<div class="post carousel row no-responsive">
					<div class="images-box col-xs-12 col-sm-4 col-md-4 <?php 
            echo $image_align == 'right' ? 'pull-right' : '';
            ?>
">
						<?php 
            if (!empty($slider)) {
                ?>

							<div class="carousel-box load" data-carousel-pagination="<?php 
                echo $carousel_pagination == 'yes' ? 'true' : 'false';
                ?>
" data-carousel-nav="<?php 
                echo $carousel_navigation == 'yes' ? 'true' : 'false';
                ?>
" data-carousel-one="true">
								<div class="carousel"> 
									<?php 
                echo $slider;
                ?>
								</div>
								<div class="nav-box">
									<a class="next" href="#">
										<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve">
											<polygon fill-rule="evenodd" clip-rule="evenodd" fill="#fcfcfc" points="1,0.001 0,1.001 7,8 0,14.999 1,15.999 9,8 "></polygon>
										</svg>
									</a>
									<a class="prev" href="#">
										<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve">
											<polygon fill-rule="evenodd" clip-rule="evenodd" fill="#fcfcfc" points="8,15.999 9,14.999 2,8 9,1.001 8,0.001 0,8 "></polygon>
										</svg>
									</a>
								</div>
								<div class="clearfix"></div>
								<div class="pagination switches"></div>
							</div>
						<?php 
            } else {
                ?>
							<img src="<?php 
                echo esc_url(get_xv_thumbnail(370, 270));
                ?>
" class="single-image" />
						<?php 
            }
            ?>
					</div>

					<div class="col-xs-12 col-sm-8 col-md-8">
						<h2 class="entry-title"><a href="<?php 
            echo esc_url(get_the_permalink());
            ?>
" title="<?php 
            echo esc_attr(get_the_title());
            ?>
"><?php 
            the_title();
            ?>
</a></h2>
						<div class="entry-content">
							<?php 
            ts_the_excerpt_theme(155);
            ?>
						</div>

						<div class="entry-meta">
							<span class="autor-name"><?php 
            the_author();
            ?>
</span>,
							<span class="time"><?php 
            the_time('j.m.Y');
            ?>
</span>
							<span class="separator">|</span>
							<span class="meta"><?php 
            _e('Posted in', 'progressive');
            ?>
 <?php 
            echo get_the_category_list(', ');
            ?>
</span>
							<span class="comments-link pull-right">
								<a href="<?php 
            comments_link();
            ?>
"><?php 
            comments_number('0', '1', '%');
            ?>
 <?php 
            _e('comment(s)', 'progressive');
            ?>
</a>
							</span>
						</div>
					</div>
					<div class="clearfix"></div>
				</div><!-- .post -->
			</div>
			<?php 
        }
        wp_reset_postdata();
    }
    $html = ob_get_contents();
    ob_end_clean();
    return $html;
}
Example #3
0
 * The template for displaying all pages.
 *
 * This is the template that displays all pages by default.
 * Please note that this is the WordPress construct of pages
 * and that other 'pages' on your WordPress site will use a
 * different template.
 *
 * @package Rhythm
 */
get_header();
ts_get_title_wrapper_template_part();
?>

<!-- Page Section -->
<section class="main-section page-section <?php 
echo sanitize_html_classes(ts_get_post_opt('page-margin-local'));
?>
">
	<div class="container relative">
		<?php 
get_template_part('templates/global/page-before-content');
?>
		<?php 
while (have_posts()) {
    the_post();
    ?>
			<?php 
    get_template_part('templates/content/content', 'page');
    ?>
			<?php 
    // If comments are open or we have at least one comment, load up the comment template
Example #4
0
<?php

/** 
 * Gallery part for portfolio single
 * 
 * @package Rhythm
 */
?>
<!-- Photo Grid -->
<div class="row multi-columns-row mb-30 mb-xs-10">
	<?php 
$gallery = ts_get_post_opt('portfolio-gallery');
if (is_array($gallery)) {
    ?>
		<?php 
    foreach ($gallery as $item) {
        ?>
			<?php 
        if (isset($item['attachment_id'])) {
            ?>
				<!-- Photo Item -->
				<div class="col-sm-6 col-md-4 col-lg-4 mb-md-10">
					<?php 
            $image_src = wp_get_attachment_image_src($item['attachment_id'], 'ts-full');
            if (is_array($image_src) && isset($image_src[0])) {
                ?>
						<div class="post-prev-img">
							<a href="<?php 
                echo esc_url($image_src[0]);
                ?>
" class="lightbox-gallery-2 mfp-image" title="<?php 
Example #5
0
/**
 * Get post option media
 * @param string $option
 * @param string $field
 * @return mix|boolean
 */
function ts_get_post_opt_media($option, $field = 'url', $id = '')
{
    $media = ts_get_post_opt($option, $id);
    if (is_array($media) && isset($media[$field]) && !empty($media[$field])) {
        return $media[$field];
    }
    return false;
}
Example #6
0
    ?>
 relative clearfix">
			<div class="nav-logo-wrap local-scroll">
				<?php 
    rhythm_logo($logo_field, get_template_directory_uri() . '/images/logo-dark.png');
    ?>
			</div>
			<div class="mobile-nav">
				<i class="fa fa-bars"></i>
			</div>
			<!-- Main Menu -->
			<div class="inner-nav desktop-nav">
				<?php 
    $menu = '';
    if (is_singular()) {
        $menu = ts_get_post_opt('header-primary-menu');
    }
    if (has_nav_menu('primary')) {
        wp_nav_menu(array('theme_location' => 'primary', 'menu' => $menu, 'container' => false, 'menu_id' => 'primary-nav', 'menu_class' => 'clearlist scroll-nav local-scroll', 'depth' => 3, 'walker' => new rhythm_menu_widget_walker_nav_menu()));
    }
    ?>
				
				<ul class="clearlist modules">
					<?php 
    if (ts_get_opt('header-enable-search')) {
        ?>
						<!-- Search -->
						<li>
							<a href="#" class="mn-has-sub"><i class="fa fa-search"></i> <?php 
        _e('Search', 'rhythm');
        ?>
">
						<?php 
        get_template_part('templates/blog-masonry/content', get_post_format());
        ?>

					</div>
				<?php 
    }
    ?>

			</div>
			<?php 
    wp_enqueue_script('masonry-pkgd');
    wp_enqueue_script('imagesloaded-pkgd');
    wp_reset_postdata();
    if (ts_get_post_opt('blog-enable-pagination') == 1) {
        rhythm_paging_nav($max_num_pages);
    }
    ?>

		<?php 
} else {
    //No posts were found
    ?>

			<?php 
    get_template_part('templates/content/content', 'none');
    ?>

		<?php 
}
function rhythm_social_links($pattern = '%s')
{
    $args = array('posts_per_page' => -1, 'offset' => 0, 'orderby' => 'menu_order', 'order' => 'ASC', 'post_type' => 'social-site', 'post_status' => 'publish');
    $custom_query = new WP_Query($args);
    if ($custom_query->have_posts()) {
        $found_posts = $custom_query->found_posts;
        $ts_loop_it = 0;
        while ($custom_query->have_posts()) {
            $custom_query->the_post();
            echo sprintf($pattern, '<a href="' . esc_url(get_the_title()) . '" target="blank"><i class=" fa ' . esc_attr(ts_get_post_opt('icon')) . '"></i></a>');
            ?>
			
			
		<?php 
        }
        // end of the loop.
    }
    wp_reset_postdata();
}
?>
>

	<?php 
get_template_part('templates/blog-classic/parts/part', 'header');
?>

	<?php 
get_template_part('templates/blog-classic/parts/part', 'meta');
?>

	
	<!-- Media -->
	<div class="blog-media">
		<?php 
$audio = ts_get_post_opt('post-audio-url');
if (!empty($audio)) {
    echo do_shortcode('[audio src="' . esc_url($audio) . '"]');
}
?>

		
		<a href="<?php 
echo esc_url(get_permalink());
?>
">
			<?php 
if (has_post_thumbnail()) {
    the_post_thumbnail('ts-full');
}
?>
</strong>
							<a href="<?php 
    echo esc_url(ts_get_post_opt('portfolio-url'));
    ?>
" target="_blank"><?php 
    echo preg_replace("(^https?://)", "", esc_url(ts_get_post_opt('portfolio-url')));
    ?>
</a>
						</p>
					<?php 
}
?>
				</div>
			</div>
		</div>

		<div class="col-md-4 col-sm-6 mb-sm-50 mb-xs-30">
			<?php 
echo wp_kses_data(ts_get_post_opt('portfolio-content-1'));
?>
		</div>

		<div class="col-md-4 col-sm-6 mb-sm-50 mb-xs-30">
			<?php 
echo wp_kses_data(ts_get_post_opt('portfolio-content-2'));
?>
		</div>

	</div>
</div>
<!-- End Project Details -->
?>
</h1>
		</div>  
	</header>
	<div class="container">
		<div class="row">
			<div class="content portfolio col-sm-12 col-md-12">

				<?php 
while (have_posts()) {
    the_post();
    ?>
					<div class="slider progressive-slider progressive-slider-four page-slider load bottom-padding load">
						<div class="slider-wrapper">
							<?php 
    $portfolio_slider = ts_get_post_opt('portfolio_slider');
    if (is_array($portfolio_slider) && count($portfolio_slider) > 0) {
        ?>
								<div class="sliders-box">

									<?php 
        $width = 1170;
        $height = 400;
        if (isset($xv_data['porfolio-single-slider-size'])) {
            $width = $xv_data['porfolio-single-slider-size']['width'];
            $height = $xv_data['porfolio-single-slider-size']['height'];
        }
        foreach ($portfolio_slider as $slide) {
            $image_url = $slide['image'];
            if (!empty($image_url)) {
                echo '<img src="' . esc_url($image_url) . '" alt=" " />';
Example #12
0
			<?php 
    }
    // end of the loop.
    ?>


			<?php 
    wp_reset_postdata();
    //get pagination here before query is reset
    ob_start();
    woocommerce_pagination();
    $pagination = ob_get_contents();
    ob_end_clean();
    wp_reset_query();
    woocommerce_product_loop_end();
    if (ts_get_post_opt('shop-enable-pagination') == 1) {
        echo $pagination;
    }
    ?>


		<?php 
} elseif (!woocommerce_product_subcategories(array('before' => woocommerce_product_loop_start(false), 'after' => woocommerce_product_loop_end(false)))) {
    ?>

			<?php 
    wp_reset_query();
    wc_get_template('loop/no-products-found.php');
    ?>

Example #13
0
					<?php 
    }
    ?>

				
				</div>
			</div>
			<div class="row section-text">
				<div class="<?php 
    echo sanitize_html_classes($items_class);
    ?>
">
				<?php 
    wp_reset_postdata();
    if (ts_get_post_opt('faq-enable-pagination') == 1) {
        rhythm_paging_nav($max_num_pages);
    }
    ?>

				</div>
			</div>
			<!-- End FAQ Items -->
			<?php 
    ?>

		<?php 
} else {
    //No posts were found
    wp_reset_postdata();
    ?>
Example #14
0
/**
 * xv_get_field - 
 */
function xv_get_field($key, $id = false, $default = '')
{
    $value = ts_get_post_opt($key, $id);
    if ($value == '') {
        return $default;
    }
    return $value;
}
Example #15
0
function ts_person_func($atts)
{
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'id' => ''), $atts));
    global $post;
    ob_start();
    $new_post = get_post($id);
    if ($new_post && !is_wp_error($new_post)) {
        setup_postdata($new_post);
        ?>
		<div class="bottom-padding">
			<div class="employee employee-single <?php 
        echo ts_get_animation_class($animation);
        ?>
" <?php 
        echo ts_get_animation_data_class($animation_delay, $animation_iteration);
        ?>
>
				<div class="row">
					<div class="images-box col-xs-9 col-sm-6 col-md-4">
						<?php 
        $post_gallery = ts_get_post_opt('post_gallery', $id);
        if (is_array($post_gallery) && count($post_gallery) > 0) {
            ?>
							<div class="carousel-box load" data-carousel-pagination="true" data-carousel-nav="false" data-carousel-one="true">
								<div class="carousel">
									<?php 
            foreach ($post_gallery as $slide) {
                if (!empty($slide['image'])) {
                    $image = theme_thumb($slide['image'], 370, 370);
                }
                if (esc_url($image)) {
                    ?>
											<div class="image">
												<img src="<?php 
                    echo esc_url($image);
                    ?>
" alt="" title="" width="370" height="370">
											</div>
											<?php 
                }
            }
            ?>
								</div>
								<div class="clearfix"></div>
								<div class="pagination switches"></div>
							</div>
						<?php 
        }
        ?>
					</div>
					<div class="employee-description col-sm-8 col-md-8">
						<h3 class="name"><?php 
        echo get_the_title($id);
        ?>
</h3>
						<div class="role"><?php 
        echo xv_get_field('xv_member_designation', $id);
        ?>
</div>
						<div>
							<p><?php 
        echo xv_get_field('xv_member_about', $id);
        ?>
</p>
							<?php 
        $email = xv_get_field('xv_member_email', $id);
        $phone = xv_get_field('xv_member_phone', $id);
        ?>
							<div class="contact"><b><?php 
        _e('Email:', 'progressive');
        ?>
 </b><?php 
        echo wp_kses_data($email);
        ?>
</div>
							<div class="contact"><b><?php 
        _e('Phone:', 'progressive');
        ?>
 </b><?php 
        echo wp_kses_data($phone);
        ?>
</div>
						</div>
						<div class="social">
							<?php 
        $facebook = xv_get_field('xv_member_facebook', $id);
        $twitter = xv_get_field('xv_member_twiiter', $id);
        $gplus = xv_get_field('xv_member_gplus', $id);
        $linkedin = xv_get_field('xv_member_linkedin', $id);
        if (!empty($facebook)) {
            ?>
								<div class="item"><a class="sbtnf sbtnf-rounded color color-hover icon-facebook" href="<?php 
            echo esc_url($facebook);
            ?>
"></a></div>
							<?php 
        }
        if (!empty($twitter)) {
            ?>
								<div class="item"><a class="sbtnf sbtnf-rounded color color-hover icon-twitter" href="<?php 
            echo esc_url($twitter);
            ?>
"></a></div>
							<?php 
        }
        if (!empty($gplus)) {
            ?>
								<div class="item"><a class="sbtnf sbtnf-rounded color color-hover icon-gplus" href="<?php 
            echo esc_url($gplus);
            ?>
"></a></div>
							<?php 
        }
        if (!empty($linkedin)) {
            ?>
								<div class="item"><a class="sbtnf sbtnf-rounded color color-hover icon-linkedin" href="<?php 
            echo esc_url($linkedin);
            ?>
"></a></div>
							<?php 
        }
        ?>
						</div>
					</div>
					<div class="clearfix"></div>
				</div>
			</div><!-- .employee -->
		</div>
		<?php 
        wp_reset_postdata();
    }
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}
">
		<h2 class="entry-title">
			<a href="<?php 
echo esc_url(get_the_permalink());
?>
" title="<?php 
echo esc_attr(get_the_title());
?>
"><?php 
the_title();
?>
</a>
		</h2>
		<div class="entry-content">
			<?php 
$post_gallery = ts_get_post_opt('post_gallery');
if (is_array($post_gallery) && count($post_gallery) > 0) {
    ?>
				<div class="carousel-box load" data-carousel-pagination="true" data-carousel-nav="false" data-carousel-one="true">
					<div class="carousel"> 
						<?php 
    foreach ($post_gallery as $slide) {
        $image = theme_thumb($slide['image'], 870, 400);
        if (!empty($image)) {
            echo '<img src="' . esc_url($image) . '" alt="" title="">';
        }
    }
    ?>
					</div>
					<div class="nav-box">
						<a class="next" href="#">
?>

	<?php 
get_template_part('templates/blog-classic/parts/part', 'meta');
?>

	
	<!-- Media -->
	<div class="blog-media">
		<?php 
$url = ts_get_post_opt('post-video-url');
if (!empty($url)) {
    $embadded_video = ts_get_embaded_video($url);
} else {
    if (empty($url)) {
        $embadded_video = ts_get_post_opt('post-video-html');
    }
}
if ($embadded_video != '') {
    echo wp_kses($embadded_video, ts_add_iframe_to_allowed_tags());
} else {
    if (has_post_thumbnail()) {
        ?>

			<a href="<?php 
        echo esc_url(get_permalink());
        ?>
">
				<?php 
        if (has_post_thumbnail()) {
            the_post_thumbnail('ts-full');
Example #18
0
        echo implode(', ', $term_names);
        ?>

								</div>
							</div>
						</a>
					</li>
					<!-- End Work Item -->
				<?php 
    }
    ?>

			</ul>
			<?php 
    wp_reset_postdata();
    if (ts_get_post_opt('portfolio-enable-pagination') == 1) {
        rhythm_paging_nav($max_num_pages);
    }
    ?>

		<?php 
} else {
    //No posts were found
    ?>

			<?php 
    get_template_part('templates/content/content', 'none');
    ?>

		<?php 
}