</script> <?php } elseif ($type == 'audio') { ?> <div class="soundcloud"> <iframe width="100%" height="166" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=<?php echo $audio_link; ?> "></iframe> </div> <?php } elseif ($type == 'featured') { ?> <div class="f_post_thumb"> <?php eff_thumb('', 588, 330); ?> </div> <?php } ?> <article id="post-<?php the_ID(); ?> " <?php post_class('clearfix'); ?> role="article" itemscope itemtype="http://schema.org/BlogPosting"> <div class="post_header"> <h2><?php the_title();
function eff_blog() { ?> <?php if (eff_option('blog_style') == 'style2') { ?> <!--BLog style 2--> <div class="block"> <?php if (have_posts()) { while (have_posts()) { the_post(); ?> <section class="section_box"> <div class="blog_style2"> <?php $type = get_post_meta($post->ID, 'eff_article_type', true); $image = get_post_meta($post->ID, 'eff_slider_option', true); $video_type = get_post_meta($post->ID, 'eff_video_type', true); $mvideo_id = get_post_meta($post->ID, 'eff_video_id', true); $gm_link = get_post_meta($post->ID, 'eff_gm_url', true); $audio_link = get_post_meta($post->ID, 'eff_audio_url', true); $postClass = ''; if ($type == 'featured') { $postClass = 'image-post'; } elseif ($type == 'video') { $postClass = 'video-post'; } elseif ($type == 'slider') { $postClass = 'slider-post'; } elseif ($type == 'audio') { $postClass = 'audio-post'; } elseif ($type == 'gmap') { $postClass = 'map-post'; } elseif ($type == 'slider') { $postClass = 'slider-post'; } else { $postClass = 'format_defult'; } ?> <?php if ($type == 'video') { ?> <div class="m_video_frame"> <?php if ($video_type == 'youtube') { ?> <iframe width="100%" height="300" src="http://www.youtube.com/embed/<?php echo $mvideo_id; ?> " frameborder="0" allowfullscreen></iframe> <?php } elseif ($video_type == 'vimo') { ?> <iframe src="http://player.vimeo.com/video/<?php echo $mvideo_id; ?> ?title=0&portrait=0&badge=0" width="100%" height="300px" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe> <?php } elseif ($video_type == 'daily') { ?> <iframe frameborder="0" width="100%" height="300" src="http://www.dailymotion.com/embed/video/<?php echo $mvideo_id; ?> ?logo=0"></iframe> <?php } ?> </div> <?php } elseif ($type == 'audio') { ?> <div class="m_soundcloud"> <iframe width="100%" height="166" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=<?php echo $audio_link; ?> "></iframe> </div> <?php } elseif ($type == 'slider') { ?> <div class="postSlideshow"> <?php global $wpdb; $images = get_post_meta($post->ID, 'eff_slider_option', false); $images = implode(',', $images); // Re-arrange images with 'menu_order' $images = $wpdb->get_col("\n\t\t\t SELECT ID FROM {$wpdb->posts}\n\t\t\t WHERE post_type = 'attachment'\n\t\t\t AND ID in ({$images})\n\t\t\t ORDER BY menu_order ASC\n\t\t\t"); foreach ($images as $att) { // Get image's source based on size, can be 'thumbnail', 'medium', 'large', 'full' or registed post thumbnails sizes $src = wp_get_attachment_image_src($att, 'large'); $src = $src[0]; // Show image ?> <img width="622px" height="257px" src="<?php echo $src; ?> "> <?php } ?> </div> <div class="slideshowControl"> <a class="slide_next"></a> <a class="slide_prev"></a> <div class="slidePager"></div> </div> <script type="text/javascript"> jQuery(document).ready(function($) { //inner slideshow $('.postSlideshow').cycle({ timeout:0, speed: 'normal', pager: '.slidePager', next:'.slide_next', prev:'.slide_prev', before: resize_slideshow }); function resize_slideshow(curr, next, opts, fwd){ //get the height of the current slide var $ht = $(this).height(); //set the container's height to that of the current slide $(this).parent().animate({ height : $ht }); } $('.postSlideshow').click(function() { $('.postSlideshow').cycle('next'); }); }); </script> <?php } elseif ($type == 'gmap') { ?> <div class="m-google-map"> <iframe width="630" height="257" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="<?php echo $gm_link; ?> &output=embed"></iframe> </div> <?php } elseif ($type == 'featured') { ?> <?php $width = 622; $height = 257; ?> <div class="f_post_thumb"> <?php eff_thumb('', $width, $height); ?> </div> <?php } else { ?> <a href="<?php the_permalink(); ?> "> <?php if (eff_post_image() != false) { ?> <?php $img = eff_post_image('large'); $Fimg = aq_resize($img, 622, 257, true); ?> <img src="<?php echo $Fimg; ?> " alt="<?php the_title(); ?> "> <?php } ?> </a> <?php } ?> <div class="bs2_head"> <span class="post_type"><i class="<?php echo $postClass; ?> "></i></span> <h2><a href="<?php the_permalink(); ?> " rel="bookmark"><?php the_title(); ?> </a></h2> <span class="post_meta"><span class="date"><?php the_time($dateformat); ?> </span><span class="author"><?php _e('Posted by: ', 'framework'); ?> <a rel="author" href="<?php echo get_author_posts_url(get_the_author_meta('ID')); ?> " title="<?php sprintf(esc_attr__('View all posts by %s', 'framework'), get_the_author()); ?> "><?php echo get_the_author(); ?> </a></span><span class="category"><?php _e('Category: ', 'framework'); printf('%1$s', get_the_category_list(', ')); ?> </span><?php if ($hpcomment == true) { ?> <a href="<?php the_permalink(); ?> " class="comments"><?php comments_number('(0) Comments', '(1) Comment', '(%) Comments'); ?> </a><?php } ?> <?php $rt_enable = get_post_meta($post->ID, 'eff_enable_review', true); $rt_style = get_post_meta($post->ID, 'eff_review_style', true); $percent_score = get_post_meta($post->ID, 'eff_rt_final_score', true); $points_score = get_post_meta($post->ID, 'eff_rt_final_score_po', true); $stars_score = get_post_meta($post->ID, 'eff_rt_final_score_stars', true); if ($rt_enable) { if ($rt_style == 'stars') { echo '<span class="rt_nb_rev rt_nb_star"><span class="rt_stars_post" title="' . $percent_score . '%"> <span class="rt_stars_post_rate" style="width:' . $percent_score . '%;"></span> </span></span>'; } if ($rt_style == 'percent') { echo '<span class="rt_nb_rev" title="' . $percent_score . '"> <span class="percent_post">' . $percent_score . '%</span> </span>'; } if ($rt_style == 'points') { echo '<span class="rt_nb_rev" title="' . $points_score . '"> <span class="percent_post">' . $points_score . '</span> </span>'; } } ?> </span> </div> <div class="content_inner"> <p> <?php global $post; $excerpt = $post->post_excerpt; if ($excerpt == '') { $excerpt = get_the_content(''); } echo wp_html_excerpt(strip_shortcodes($excerpt), 600); ?> ... </p> <a href="<?php the_permalink(); ?> " class="read_more"><?php _e('Read More »', 'framework'); ?> </a> </div> </div> </section> <?php } } else { ?> <!--else here--> <?php } ?> <?php wp_reset_query(); ?> </div> <!--BLog style 2--> <?php eff_pagination(); ?> <?php } elseif (eff_option('blog_style') == 'style1') { ?> <!--Blog Style--> <div class="block"> <?php if (have_posts()) { while (have_posts()) { the_post(); ?> <section class="section_box"> <div class="blog_style1"> <?php $type = get_post_meta($post->ID, 'eff_article_type', true); $image = get_post_meta($post->ID, 'eff_slider_option', true); $video_type = get_post_meta($post->ID, 'eff_video_type', true); $mvideo_id = get_post_meta($post->ID, 'eff_video_id', true); $gm_link = get_post_meta($post->ID, 'eff_gm_url', true); $audio_link = get_post_meta($post->ID, 'eff_audio_url', true); $postClass = ''; if ($type == 'featured') { $postClass = 'image-post'; } elseif ($type == 'video') { $postClass = 'video-post'; } elseif ($type == 'slider') { $postClass = 'slider-post'; } elseif ($type == 'audio') { $postClass = 'audio-post'; } elseif ($type == 'gmap') { $postClass = 'map-post'; } elseif ($type == 'slider') { $postClass = 'slider-post'; } else { $postClass = 'format_defult'; } ?> <div class="content_inner"> <div class="post_thumb"> <a href="<?php the_permalink(); ?> "> <?php $img = eff_post_image('medium'); $Fimg = aq_resize($img, 167, 171, true); ?> <?php if (strpos(eff_post_image(), 'youtube')) { ?> <img src="<?php echo eff_post_image(); ?> " width="167" height="171" alt="<?php the_title(); ?> " title="<?php the_title(); ?> " /> <?php } elseif (strpos(eff_post_image(), 'vimeo')) { ?> <img src="<?php echo eff_post_image(); ?> " width="167" height="171" alt="<?php the_title(); ?> " title="<?php the_title(); ?> " /> <?php } elseif (strpos(eff_post_image(), 'dailymotion')) { ?> <img src="<?php echo eff_post_image(); ?> " width="167" height="171" alt="<?php the_title(); ?> " title="<?php the_title(); ?> " /> <?php } else { ?> <img src="<?php echo $Fimg; ?> " alt="<?php the_title(); ?> " title="<?php the_title(); ?> " /> <?php } ?> <span class="overlay <?php echo $postClass; ?> "></span> </a> </div> <h2><a href="<?php the_permalink(); ?> " rel="bookmark"><?php the_title(); ?> </a></h2> <span class="post_meta"><?php the_time($dateformat); if ($hpcomment == true) { ?> <a href="<?php the_permalink(); ?> " class="comments"><?php comments_number('(0) Comments', '(1) Comment', '(%) Comments'); ?> </a><?php } ?> <?php $rt_enable = get_post_meta($post->ID, 'eff_enable_review', true); $rt_style = get_post_meta($post->ID, 'eff_review_style', true); $percent_score = get_post_meta($post->ID, 'eff_rt_final_score', true); $points_score = get_post_meta($post->ID, 'eff_rt_final_score_po', true); $stars_score = get_post_meta($post->ID, 'eff_rt_final_score_stars', true); if ($rt_enable) { if ($rt_style == 'stars') { echo '<span class="rt_nb_rev rt_nb_star"><span class="rt_stars_post" title="' . $percent_score . '%"> <span class="rt_stars_post_rate" style="width:' . $percent_score . '%;"></span> </span></span>'; } if ($rt_style == 'percent') { echo '<span class="rt_nb_rev" title="' . $percent_score . '"> <span class="percent_post">' . $percent_score . '%</span> </span>'; } if ($rt_style == 'points') { echo '<span class="rt_nb_rev" title="' . $points_score . '"> <span class="percent_post">' . $points_score . '</span> </span>'; } } ?> </span> <p> <?php global $post; $excerpt = $post->post_excerpt; if ($excerpt == '') { $excerpt = get_the_content(''); } echo wp_html_excerpt(strip_shortcodes($excerpt), 250); ?> ... </p> <a href="<?php the_permalink(); ?> " class="read_more"><?php _e('Read More »', 'framework'); ?> </a> </div> </div> </section> <?php } } else { ?> <!--else here--> <?php } ?> <?php wp_reset_query(); ?> </div> <!--Blog Style--> <?php eff_pagination(); ?> <?php } elseif (eff_option('blog_style') == 'masonry') { ?> <?php if (have_posts()) { while (have_posts()) { the_post(); ?> <div class="brick"> <article class="blog_masonry"> <?php $type = get_post_meta($post->ID, 'eff_article_type', true); $image = get_post_meta($post->ID, 'eff_slider_option', true); $video_type = get_post_meta($post->ID, 'eff_video_type', true); $mvideo_id = get_post_meta($post->ID, 'eff_video_id', true); $gm_link = get_post_meta($post->ID, 'eff_gm_url', true); $audio_link = get_post_meta($post->ID, 'eff_audio_url', true); $postClass = ''; if ($type == 'featured') { $postClass = 'image-post'; } elseif ($type == 'video') { $postClass = 'video-post'; } elseif ($type == 'slider') { $postClass = 'slider-post'; } elseif ($type == 'audio') { $postClass = 'audio-post'; } elseif ($type == 'gmap') { $postClass = 'map-post'; } elseif ($type == 'slider') { $postClass = 'slider-post'; } else { $postClass = 'format_defult'; } ?> <?php if ($type == 'video') { ?> <div class="m_video_frame"> <?php if ($video_type == 'youtube') { ?> <iframe width="100%" height="230" src="http://www.youtube.com/embed/<?php echo $mvideo_id; ?> " frameborder="0" allowfullscreen></iframe> <?php } elseif ($video_type == 'vimo') { ?> <iframe src="http://player.vimeo.com/video/<?php echo $mvideo_id; ?> ?title=0&portrait=0&badge=0" width="100%" height="230px" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe> <?php } elseif ($video_type == 'daily') { ?> <iframe frameborder="0" width="100%" height="230" src="http://www.dailymotion.com/embed/video/<?php echo $mvideo_id; ?> ?logo=0"></iframe> <?php } ?> </div> <?php } elseif ($type == 'audio') { ?> <div class="m_soundcloud"> <iframe width="100%" height="166" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=<?php echo $audio_link; ?> "></iframe> </div> <?php } elseif ($type == 'slider') { ?> <div class="postSlideshow"> <?php global $wpdb; $images = get_post_meta($post->ID, 'eff_slider_option', false); $images = implode(',', $images); // Re-arrange images with 'menu_order' $images = $wpdb->get_col("\n\t\t\t\t SELECT ID FROM {$wpdb->posts}\n\t\t\t\t WHERE post_type = 'attachment'\n\t\t\t\t AND ID in ({$images})\n\t\t\t\t ORDER BY menu_order ASC\n\t\t\t\t"); foreach ($images as $att) { // Get image's source based on size, can be 'thumbnail', 'medium', 'large', 'full' or registed post thumbnails sizes $src = wp_get_attachment_image_src($att, 'large'); $src = $src[0]; // Show image ?> <img width="300px" height="210px" src="<?php echo $src; ?> "> <?php } ?> </div> <div class="slideshowControl"> <a class="slide_next"></a> <a class="slide_prev"></a> <div class="slidePager"></div> </div> <script type="text/javascript"> jQuery(document).ready(function($) { //inner slideshow $('.postSlideshow').cycle({ timeout:0, speed: 'normal', pager: '.slidePager', next:'.slide_next', prev:'.slide_prev', before: resize_slideshow }); function resize_slideshow(curr, next, opts, fwd){ //get the height of the current slide var $ht = $(this).height(); //set the container's height to that of the current slide $(this).parent().animate({ height : $ht }); } $('.postSlideshow').click(function() { $('.postSlideshow').cycle('next'); }); }); </script> <?php } elseif ($type == 'featured') { ?> <?php $width = 300; $height = 205; ?> <div class="f_post_thumb"> <?php eff_thumb('', $width, $height); ?> </div> <?php } else { ?> <a href="<?php the_permalink(); ?> "> <?php if (eff_post_image() != false) { ?> <?php $img = eff_post_image('larg'); $Fimg = aq_resize($img, 300, 205, true); ?> <img src="<?php echo $Fimg; ?> " alt="<?php the_title(); ?> "> <?php } ?> </a> <?php } ?> <div class="mp_header"> <span class="post_type"><i class="<?php echo $postClass; ?> "></i></span> <h2><a href="<?php the_permalink(); ?> " rel="bookmark"><?php the_title(); ?> </a></h2> </div> <span class="post_meta"><?php the_time($dateformat); if ($hpcomment == true) { ?> <a href="<?php the_permalink(); ?> " class="comments"><?php comments_number('(0) Comments', '(1) Comment', '(%) Comments'); ?> </a><?php } ?> <?php $rt_enable = get_post_meta($post->ID, 'eff_enable_review', true); $rt_style = get_post_meta($post->ID, 'eff_review_style', true); $percent_score = get_post_meta($post->ID, 'eff_rt_final_score', true); $points_score = get_post_meta($post->ID, 'eff_rt_final_score_po', true); $stars_score = get_post_meta($post->ID, 'eff_rt_final_score_stars', true); if ($rt_enable) { if ($rt_style == 'stars') { echo '<span class="rt_nb_rev rt_nb_star"><span class="rt_stars_post" title="' . $percent_score . '%"> <span class="rt_stars_post_rate" style="width:' . $percent_score . '%;"></span> </span></span>'; } if ($rt_style == 'percent') { echo '<span class="rt_nb_rev" title="' . $percent_score . '"> <span class="percent_post">' . $percent_score . '%</span> </span>'; } if ($rt_style == 'points') { echo '<span class="rt_nb_rev" title="' . $points_score . '"> <span class="percent_post">' . $points_score . '</span> </span>'; } } ?> </span> <p> <?php global $post; $excerpt = $post->post_excerpt; if ($excerpt == '') { $excerpt = get_the_content(''); } echo wp_html_excerpt(strip_shortcodes($excerpt), 200); ?> ... </p> <a href="<?php the_permalink(); ?> " class="read_more"><?php _e('Read More »', 'framework'); ?> </a> </article> </div> <div class="clear"></div> <?php } } else { ?> <!--else here--> <?php } ?> <?php wp_reset_query(); ?> <script type="text/javascript"> jQuery(document).ready(function($) { // Masonry $('.main_content_masonry').masonry({ // options itemSelector : '.brick', columnWidth : 320, isAnimated: true, animationOptions: { duration: 750, easing: 'linear', queue: false } }); }); </script> <?php } ?> <?php }