Example #1
0
<?php else: ?>
	
	
	<?php if( $featured_query->have_posts() ) : ?>
	<div id="flexslider" class="flexslider">
		<ul class="slides">
		<?php while ( $featured_query->have_posts() ) : $featured_query->the_post()?>
			<li>
			<?php if ( function_exists("has_post_thumbnail") && has_post_thumbnail() ) : ?>			
				<a href="<?php the_permalink(); ?>">
				<?php the_post_thumbnail( 'slider' ); ?>
				</a>
			<?php endif; ?>
				<div class="slider-caption">
					<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
					<?php if ( !empty( $cat_options['slider_caption'] ) ) : ?><p><?php echo tie_content_limit( get_the_excerpt() , $caption_length ) ?></p><?php endif; ?>
				</div>
			</li>
		<?php endwhile;?>
		</ul>
	</div>
	<?php endif; ?>
	
<?php endif; ?>
	
	
	<?php
	
	
	}else{
		$custom_slider_args = array( 'post_type' => 'tie_slider', 'p' => $slider_query, 'no_found_rows' => 1  );
Example #2
0
            the_permalink();
            ?>
"></a></div>
				<div class="featured-title">
					<?php 
            tie_get_time();
            ?>
					<h2><a href="<?php 
            the_permalink();
            ?>
"><?php 
            the_title();
            ?>
</a></h2>
					<h3><?php 
            echo tie_content_limit(get_the_excerpt(), 100);
            ?>
</h3>
				</div>
			</div>
		</div>
		<?php 
            if ($i == 5) {
                $i = 0;
            }
        }
        ?>
	</div>
	<div class="clear"></div>
	<?php 
    }
			<?php 
                    }
                    ?>
				<div class="slider-caption">
					<h2><a href="<?php 
                    the_permalink();
                    ?>
"><?php 
                    the_title();
                    ?>
</a></h2>
					<?php 
                    if (tie_get_option('slider_caption')) {
                        ?>
<p><?php 
                        echo tie_content_limit(get_the_excerpt(), $caption_length);
                        ?>
</p><?php 
                    }
                    ?>
				</div>
			</li>
		<?php 
                }
                ?>
		</ul>
	</div>
	<?php 
            }
            ?>
	
function tie_og_data()
{
    global $post;
    if (function_exists("has_post_thumbnail") && has_post_thumbnail()) {
        $post_thumb = tie_thumb_src('slider');
    } else {
        $protocol = is_ssl() ? 'https' : 'http';
        $get_meta = get_post_custom($post->ID);
        if (!empty($get_meta["tie_video_url"][0])) {
            $video_url = $get_meta["tie_video_url"][0];
            $video_link = @parse_url($video_url);
            if ($video_link['host'] == 'www.youtube.com' || $video_link['host'] == 'youtube.com') {
                parse_str(@parse_url($video_url, PHP_URL_QUERY), $my_array_of_vars);
                $video = $my_array_of_vars['v'];
                $post_thumb = $protocol . '://img.youtube.com/vi/' . $video . '/0.jpg';
            } elseif ($video_link['host'] == 'www.vimeo.com' || $video_link['host'] == 'vimeo.com') {
                $video = (int) substr(@parse_url($video_url, PHP_URL_PATH), 1);
                $url = $protocol . '://vimeo.com/api/v2/video/' . $video . '.php';
                $contents = @file_get_contents($url);
                $thumb = @unserialize(trim($contents));
                $post_thumb = $thumb[0]['thumbnail_large'];
            }
        }
    }
    $og_title = strip_shortcodes(strip_tags(get_the_title()));
    $og_description = htmlspecialchars(strip_tags(strip_shortcodes($post->post_content)));
    $og_type = 'article';
    if (is_home() || is_front_page()) {
        $og_title = get_bloginfo('name');
        $og_description = get_bloginfo('description');
        $og_type = 'website';
    }
    ?>
<meta property="og:title" content="<?php 
    echo $og_title;
    ?>
"/>
<meta property="og:type" content="<?php 
    echo $og_type;
    ?>
"/>
<meta property="og:description" content="<?php 
    echo tie_content_limit($og_description, 100);
    ?>
"/>
<meta property="og:url" content="<?php 
    the_permalink();
    ?>
"/>
<meta property="og:site_name" content="<?php 
    echo get_bloginfo('name');
    ?>
"/>
<?php 
    if (!empty($post_thumb)) {
        echo '<meta property="og:image" content="' . $post_thumb . '" />' . "\n";
    }
}
Example #5
0
	
		$featured_query = new wp_query( $args );
	}
	
if( $featured_posts_query != 'custom' ): ?>		
	<?php if( $featured_query->have_posts() ) : ?>
	<div id="featured-posts"<?php if( $featured_posts_number <= 5 ) echo ' class="featured-posts-disable-nav"'; ?>>
	<?php $i = $j= 0;
		while ( $featured_query->have_posts() ) : $featured_query->the_post(); $i++; $j++; ?>
		<div class="featured-post featured-post-<?php echo $i; ?> fea-<?php echo $j; ?>">
			<div class="featured-post-inner" style="background-image:url(<?php echo tie_thumb_src( $size ); ?>);">	
				<div class="featured-cover"><a href="<?php the_permalink(); ?>"><span><?php the_title(); ?></span></a></div>
				<div class="featured-title">
					<?php tie_get_time() ?>
					<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
					<h3><?php echo tie_content_limit( get_the_excerpt() , 100 ) ?></h3>
				</div>
			</div>
		</div>
		<?php if( $i == 5) $i=0;
		endwhile;?>
	</div>
	<div class="clear"></div>
	<?php endif; ?>
<?php else: ?>
					
	<div id="featured-posts" class="">
		<?php $i = $j= 0;
		if( $fea_custom_slider ){
		foreach( $fea_custom_slider as $slide ): $i++ ; $j++;?>	
			<div class="featured-post featured-post-<?php echo $i; ?> fea-<?php echo $j; ?>">