function get_home_news_videos($cat_data)
{
    $Cat_ID = $cat_data['id'];
    $offset = $Box_Title = '';
    if (!empty($cat_data['title'])) {
        $Box_Title = $cat_data['title'];
    }
    if (!empty($cat_data['offset'])) {
        $offset = $cat_data['offset'];
    }
    $count = 0;
    $cat_query = new WP_Query(array('cat' => $Cat_ID, 'posts_per_page' => 4, 'offset' => $offset, 'no_found_rows' => 1, 'meta_query' => array('relation' => 'OR', array('key' => 'tie_video_url', 'value' => ' ', 'compare' => '!='), array('key' => 'tie_embed_code', 'value' => ' ', 'compare' => '!='))));
    ?>
		<section class="cat-box video-box clear">
			<div class="cat-box-title">
				<h2><a href="<?php 
    echo get_category_link($Cat_ID);
    ?>
"><?php 
    if (function_exists('icl_t')) {
        echo icl_t(theme_name, $cat_data['boxid'], $Box_Title);
    } else {
        echo $Box_Title;
    }
    ?>
</a></h2>
				<div class="stripe-line"></div>
			</div><!-- post-thumbnail /-->
			<div class="cat-box-content">
			
				<?php 
    if ($cat_query->have_posts()) {
        ?>
				<ul>
				<?php 
        while ($cat_query->have_posts()) {
            $cat_query->the_post();
            $count++;
            ?>
				<?php 
            if ($count == 1) {
                ?>
					<li <?php 
                tie_post_class('big-video-column');
                ?>
>
						<?php 
                tie_video();
                ?>
					</li><!-- .first-news -->
					<?php 
            } else {
                ?>
					<?php 
                if (function_exists("has_post_thumbnail") && has_post_thumbnail()) {
                    ?>
			
					<li <?php 
                    tie_post_class('videos-item' . $count);
                    ?>
>
						<div class="post-thumbnail">
							<a class="ttip" href="<?php 
                    the_permalink();
                    ?>
" title="<?php 
                    the_title();
                    ?>
" rel="bookmark"><?php 
                    tie_thumb('tie-medium');
                    ?>
<span class="overlay-icon"></span></a>
						</div><!-- post-thumbnail /-->
					</li>
					<?php 
                }
                ?>
			
					<?php 
            }
            ?>
				<?php 
        }
        ?>
				</ul>
				<div class="clear"></div>
				<?php 
    }
    ?>
			</div><!-- .cat-box-content /-->
		</section><!-- Videos Box -->
<?php 
}
Ejemplo n.º 2
0
<?php

global $get_meta, $post;
$original_post = $post;
if (empty($get_meta['tie_post_head'][0]) || !empty($get_meta['tie_post_head'][0]) && $get_meta['tie_post_head'][0] != 'none') {
    //Get Post Video
    if (!empty($get_meta['tie_post_head'][0]) && $get_meta['tie_post_head'][0] == 'video') {
        ?>
		<div class="single-post-video">
			<?php 
        tie_video();
        ?>
		</div>
	<?php 
    } elseif (!empty($get_meta['tie_post_head'][0]) && $get_meta['tie_post_head'][0] == 'audio') {
        if (!empty($get_meta["tie_audio_mp3"][0]) || !empty($get_meta["tie_audio_m4a"][0]) || !empty($get_meta["tie_audio_oga"][0])) {
            if ($get_meta["tie_sidebar_pos"][0] == 'full' || !empty($get_meta["tie_post_head_cover"][0])) {
                $size = 'big-slider';
            } else {
                $size = 'slider';
            }
            $style = '';
            if (!has_post_thumbnail($post->ID)) {
                $style = ' style="bottom:0;"';
            }
            ?>
			<div class="single-post-audio single-post-thumb">
				<?php 
            the_post_thumbnail($size);
            ?>
				<div class="single-audio"<?php 
Ejemplo n.º 3
0
<?php
global $get_meta, $post;
$original_post = $post;
			
if( empty( $get_meta['tie_post_head'][0] ) || ( !empty( $get_meta['tie_post_head'][0] ) && $get_meta['tie_post_head'][0] != 'none' ) ):
		
	//Get Post Video
	if( !empty( $get_meta['tie_post_head'][0] ) && $get_meta['tie_post_head'][0] == 'video' ){ ?>
		<div class="single-post-video">
			<?php tie_video(); ?>
		</div>
	<?php	
	}elseif( !empty( $get_meta['tie_post_head'][0] ) && $get_meta['tie_post_head'][0] == 'audio' ){
		if( !empty( $get_meta["tie_audio_mp3"][0] ) || !empty( $get_meta["tie_audio_m4a"][0] ) || !empty( $get_meta["tie_audio_oga"][0] ) ){
			if( $get_meta["tie_sidebar_pos"][0] == 'full' || !empty( $get_meta["tie_post_head_cover"][0] ) ){
				$size = 'big-slider';
			}else{
				$size = 'slider';
			}
			
			$style = '';
			if ( !has_post_thumbnail($post->ID) ) $style =' style="bottom:0;"'; ?>
			<div class="single-post-audio single-post-thumb">
				<?php the_post_thumbnail( $size ); ?>
				<div class="single-audio"<?php echo $style ?>><?php tie_audio(); ?></div>
			</div>
	<?php
		}
	}elseif( !empty( $get_meta['tie_post_head'][0] ) && $get_meta['tie_post_head'][0] == 'soundcloud' ){
		if( !empty( $get_meta["tie_audio_soundcloud"][0] ) ){
			$play = $visual = 'false';