function fave_get_item_scope_meta() { $output = ''; $author_id = get_the_author_meta('ID'); $output .= '<meta itemprop="author" content = "' . get_the_author_meta('display_name', $author_id) . '">'; $author_google_meta = get_the_author_meta('fave_author_google_plus', $author_id); if (!empty($author_google_meta)) { echo '<a href="' . $author_google_meta . '?rel=author"></a>'; } $fave_review_checkbox = get_post_meta(get_the_ID(), 'fave_review_checkbox', true); $fave_summary = get_post_meta(get_the_ID(), 'fave_summary', true); $fave_final_score = get_post_meta(get_the_ID(), 'fave_final_score', true); $fave_final_score_override = get_post_meta(get_the_ID(), 'fave_final_score_override', true); if ($fave_final_score_override != NULL) { $fave_final_score = $fave_final_score_override; } $fave_review_final_score = intval($fave_final_score); $fave_score_output = $fave_review_final_score / 10; if ($fave_review_checkbox == 1 and is_single()) { $article_date_unix = get_the_time('U', get_the_ID()); if (!empty($fave_summary)) { $output .= '<meta itemprop="about" content = "' . $fave_summary . '">'; } else { $output .= '<meta itemprop="about" content = "' . fave_clean_excerpt('250', false) . '">'; } $output .= '<meta itemprop="itemreviewed" content = "' . get_the_title() . '">'; $output .= '<meta itemprop="datePublished" content="' . date(DATE_W3C, $article_date_unix) . '">'; $output .= '<span class="favethemes-page-meta" itemprop="reviewRating" itemscope itemtype="' . fave_http_or_https() . '://schema.org/Rating">'; $output .= '<meta itemprop="worstRating" content = "1">'; $output .= '<meta itemprop="bestRating" content = "10">'; $output .= '<meta itemprop="ratingValue" content = "' . $fave_score_output . '">'; $output .= ' </span>'; } return $output; }
<h2 itemprop="headline" class="post-title module-small-title"><a itemprop="url" href="<?php the_permalink(); ?> "><?php the_title(); ?> </a></h2> <ul class="list-inline post-meta"> <?php get_template_part('inc/post', 'meta'); ?> </ul><!-- .post-meta --> <div class="post-content post-small-content" itemprop="articleBody"> <p><?php echo fave_clean_excerpt('110', true); ?> </p> </div><!-- post-content --> </article><!-- .module-5-post --> </div><!-- col-lg-6 col-md-6 col-sm-12 col-xs-12 --> <?php } ?> </div><!-- .row --> </div><!-- module-body --> </div><!-- related-post -->
?> "><?php the_title(); ?> </a></h2> <ul class="list-inline post-meta"> <?php get_template_part('inc/post', 'meta'); ?> </ul><!-- .post-meta --> <?php if ($posts_excerpt != 'disable') { ?> <div class="post-content post-small-content" itemprop="articleBody"> <p><?php echo fave_clean_excerpt('250', 'true'); ?> </p> </div><!-- post-content --> <?php } ?> </article><!-- .post --> </div> <?php } } ?> </div>
the_title(); ?> </a></h2> <ul class="list-inline post-meta"> <?php get_template_part('inc/cat', 'meta'); ?> </ul><!-- .post-meta --> <?php if ($fave_cat_excerpt != 'disable') { ?> <div class="post-content post-small-content" itemprop="articleBody"> <p><?php echo fave_clean_excerpt('115', 'true'); ?> </p> </div><!-- post-content --> <?php } ?> </article><!-- .module-2-post --> </div><!-- col-lg-6 col-md-6 col-sm-12 col-xs-12 --> </div> <?php } } ?>
/** * Front-end display of widget **/ public function widget($args, $instance) { global $before_widget, $after_widget, $before_title, $after_title, $ft_option; extract($args); $title = apply_filters('widget_title', $instance['title']); $items_num = $instance['items_num']; $category = $instance['category']; $first_big = $instance['first_post']; $post_meta = $instance['post_meta']; echo $before_widget; if ($title) { echo $before_title . $title . $after_title; } ?> <?php $qy_latest = new WP_Query(array('post_type' => 'post', 'cat' => $category, 'posts_per_page' => $items_num, 'ignore_sticky_posts' => 1)); ?> <div class="widget-body"> <?php $i = 0; ?> <?php if ($qy_latest->have_posts()) { while ($qy_latest->have_posts()) { $qy_latest->the_post(); $i++; ?> <?php if ($i == 1 && $first_big == 'yes') { ?> <div class="latest-post"> <?php if (has_post_thumbnail()) { ?> <div class="featured-image-wrap"> <?php get_template_part('inc/article', 'icon'); ?> <?php if ($ft_option['widget_category'] != 0) { ?> <div class="category-label"><?php get_template_part('inc/post', 'cats'); ?> </div> <?php } ?> <a href="<?php echo esc_url(get_permalink()); ?> "> <img alt="<?php the_title(); ?> " width="370" height="277" class="featured-image" src="<?php echo fave_featured_image(get_the_ID(), 370, 277, true, true, true); ?> "> </a> </div><!-- featured-image-wrap --> <?php } ?> <article class="post"> <h2 class="post-title module-big-title"><a href="<?php the_permalink(); ?> "><?php the_title(); ?> </a></h2> <?php if ($post_meta != 'no') { ?> <ul class="list-inline post-meta"> <?php get_template_part('inc/widgets', 'meta'); ?> </ul><!-- .post-meta --> <?php } ?> <div class="post-content post-small-content"> <p><?php echo fave_clean_excerpt('130', true); ?> </p> </div><!-- post-content --> </article><!-- .post --> </div> <?php } else { ?> <div class="latest-post"> <div class="row"> <div class="col-xs-4 col-sm-12 col-md-4 col-lg-4"> <?php if (has_post_thumbnail()) { ?> <div class="featured-image-wrap"> <?php if ($ft_option['widget_category'] != 0) { ?> <div class="category-label"><?php get_template_part('inc/post', 'cats'); ?> </div> <?php } ?> <a href="<?php echo esc_url(get_permalink()); ?> "> <img alt="<?php the_title(); ?> " width="200" height="200" class="featured-image" src="<?php echo fave_featured_image(get_the_ID(), 200, 200, true, true, true); ?> "> </a> </div> <?php } ?> </div> <div class="col-xs-8 col-sm-12 col-md-8 col-lg-8 no-padding-left"> <h2 class="post-title module-small-title"> <a href="<?php the_permalink(); ?> "><?php the_title(); ?> </a> </h2> <?php if ($post_meta != 'no') { ?> <ul class="list-inline post-meta"> <?php get_template_part('inc/widgets', 'meta'); ?> </ul><!-- .post-meta --> <?php } ?> </div> </div> </div> <?php } ?> <?php } } ?> <?php wp_reset_postdata(); ?> </div> <?php echo $after_widget; }
function fav_module_6($atts, $content = null) { extract(shortcode_atts(array('category_id' => '', 'category_ids' => '', 'tag_slug' => '', 'sort' => '', 'autors_id' => '', 'posts_limit' => '', 'offset' => '', 'header_color' => '', 'header_text_color' => '', 'header_border_color' => '', 'custom_title' => '', 'custom_url' => '', 'hide_title' => '', 'title_style' => '', 'show_child_cat' => '', 'excerpt_limit' => '', 'image_size' => '', 'read_more' => '', 'module_meta' => '', 'author_name' => '', 'time_diff' => '', 'post_date' => '', 'post_time' => '', 'post_view_count' => '', 'post_comment_count' => '', 'module_bg' => '', 'module_padding' => ''), $atts)); ob_start(); //do the query $the_query = fave_data_source::get_wp_query($atts); //by ref do the query if ($image_size == '570_427') { $img_width = '570'; $img_height = '427'; } else { $img_width = '370'; $img_height = '277'; } $style = $bg = $padding = ''; if (!empty($module_bg)) { $bg = "background-color:" . $module_bg . ";"; } if (!empty($module_padding)) { $padding = "padding:" . $module_padding . ";"; } if (!empty($bg) || !empty($padding)) { $style = 'style="' . $bg . ' ' . $padding . '"'; } ?> <div class="module-6 module" <?php echo $style; ?> > <?php if ($hide_title != 'hide_title') { ?> <div class="row"> <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12"> <div class="module-top clearfix"> <?php //get the block title echo fave_get_block_title($atts); //get the sub category filter for this block echo fave_get_block_sub_cats($atts); ?> </div><!-- .module-top --> </div><!-- col-lg-12 col-md-12 col-sm-12 col-xs-12 --> </div><!-- .row --> <?php } ?> <?php while ($the_query->have_posts()) { $the_query->the_post(); $categories = get_the_category(get_the_ID()); $cats_html = ''; if ($categories) { foreach ($categories as $category) { $cat_id = $category->cat_ID; $cat_link = get_category_link($cat_id); $cats_html .= '<a class="cat-color-' . $cat_id . '" href="' . esc_url($cat_link) . '">' . esc_html($category->name) . '</a>'; } } ?> <div <?php post_class('row'); ?> <?php echo fave_get_item_scope(); ?> > <?php if (has_post_thumbnail()) { ?> <div class="col-lg-6 col-md-6 col-sm-5 col-xs-5"> <div class="featured-image-wrap"> <?php get_template_part('inc/article', 'icon'); ?> <a href="<?php echo esc_url(get_permalink()); ?> "> <img itemprop="image" class="featured-image" width="<?php echo $img_width; ?> " height="<?php echo $img_height; ?> " src="<?php echo fave_featured_image(get_the_ID(), $img_width, $img_height, true, true, true); ?> " alt="<?php the_title(); ?> "> </a> </div><!-- featured-image-wrap --> </div><!-- col-lg-6 col-md-6 col-sm-5 col-xs-5 --> <?php } ?> <div class="col-lg-6 col-md-6 col-sm-7 col-xs-7"> <article> <div class="category-label-wrap"> <div class="category-label"><?php echo $cats_html; ?> </div> </div><!-- category-label-wrap --> <h2 itemprop="headline" class="post-title module-big-title"><a itemprop="url" href="<?php echo esc_url(get_permalink()); ?> "><?php the_title(); ?> </a></h2> <ul class="list-inline post-meta"> <?php fave_vc_modules_meta($module_meta, $author_name, $time_diff, $post_date, $post_time, $post_view_count, $post_comment_count); ?> </ul><!-- .post-meta --> <div class="post-content post-small-content" itemprop="articleBody"><p><?php echo fave_clean_excerpt($excerpt_limit, $read_more); ?> </p></div><!-- post-content --> </article><!-- .module-6-post --> </div><!-- col-lg-6 col-md-6 col-sm-7 col-xs-7 --> </div><!-- .row --> <?php } ?> </div><!-- .module-6 --> <?php $result = ob_get_contents(); ob_end_clean(); return $result; }
?> "><?php the_title(); ?> </a></h2> <ul class="list-inline post-meta"> <?php get_template_part('inc/post', 'meta'); ?> </ul><!-- .post-meta --> <?php if ($posts_excerpt != 'disable') { ?> <div class="post-content"> <p><?php echo fave_clean_excerpt('300', 'true'); ?> </p> </div><!-- post-content --> <?php } ?> </article><!-- .module-2-post --> </div><!-- col-lg-8 col-md-8 col-sm-8 col-xs-8 --> </div> <?php } } ?>
"><?php the_title(); ?> </a></h2> <ul class="list-inline post-meta"> <?php get_template_part('inc/cat', 'meta'); ?> </ul><!-- .post-meta --> <?php if ($fave_cat_excerpt != 'disable') { ?> <div class="post-content post-small-content" itemprop="articleBody"> <p><?php echo fave_clean_excerpt($fave_excerpt, 'true'); ?> </p> </div><!-- post-content --> <?php } ?> </article><!-- .post --> </div><!-- col-lg-4 col-md-4 col-sm-4 col-xs-12 --> </div><!-- row --> </div> <?php }
<h2 class="post-title module-big-title"><a href="<?php echo esc_url(get_permalink()); ?> "><?php the_title(); ?> </a></h2> <ul class="list-inline post-meta"> <?php get_template_part('inc/post-meta'); ?> </ul><!-- .post-meta --> <div class="post-content"> <p><?php echo fave_clean_excerpt('115', ‘true’); ?> </p> </div><!-- post-content --> </article><!-- .module-2-post --> </div><!-- col-lg-8 col-md-8 col-sm-8 col-xs-8 --> </div><!-- .row --> <?php } ?> <div class="row"> <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> <?php get_template_part('inc/pagination/numeric');