Exemplo n.º 1
0
        echo do_shortcode($soundcloud);
        echo '</div><!-- .entry-thumb -->';
    }
} elseif ($type == 'upload') {
    if ($audios = rwmb_meta('_kt_audio_mp3', 'type=file')) {
        printf('<div class="entry-thumb-audio post-item-thumb" style="%s">', "background-image: url('" . get_the_post_thumbnail_url() . "');");
        foreach ($audios as $audio) {
            echo do_shortcode('[audio src="' . $audio['url'] . '"][/audio]');
            break;
        }
        echo '</div><!-- .entry-thumb-audio -->';
    }
}
?>
    <div class="post-item-inner">
        <?php 
the_title(sprintf('<h3 class="entry-title"><a href="%s" rel="bookmark">', esc_url(get_permalink())), '</a></h3>');
?>
        <div class="post-item-content">
            <?php 
kt_entry_meta_categories();
the_content(sprintf(esc_html__('Continue reading %s', 'adroit'), ' <i class="fa fa-long-arrow-right"></i>'));
kt_entry_meta(true);
?>
        </div>
    </div>


</article>

Exemplo n.º 2
0
?>
" <?php 
post_class('blog-post');
?>
 itemscope="" itemtype="http://schema.org/BlogPosting">
    <?php 
kt_post_thumbnail_image('kt_list');
?>
    <?php 
kt_entry_date();
?>
    <div class="blog-post-content">
        <div class="blog-post-inner">
            <?php 
the_title(sprintf('<h2 class="entry-title" itemprop="name headline"><a href="%s" rel="bookmark">', esc_url(get_permalink())), '</a></h2>');
?>
            <?php 
kt_entry_excerpt();
?>
            <?php 
kt_entry_meta();
?>
            <p class="entry-more">
                <?php 
printf('<a href="%1$s" class="%2$s">%3$s</a>', esc_url(get_permalink(get_the_ID())), 'btn btn-default', sprintf(esc_html__('Read more %s', 'mondova'), '<span class="screen-reader-text">' . get_the_title(get_the_ID()) . '</span>'));
?>
            </p>
        </div>
    </div>
</article><!-- #post-## -->
Exemplo n.º 3
0
    public function widget($args, $instance)
    {
        if (!isset($args['widget_id'])) {
            $args['widget_id'] = $this->id;
        }
        $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
        $number = !empty($instance['number']) ? absint($instance['number']) : 5;
        $just_featured = isset($instance['just_featured']) ? $instance['just_featured'] : false;
        if (!$number) {
            $number = 5;
        }
        $args_article = array('posts_per_page' => $number, 'no_found_rows' => true, 'post_status' => 'publish', 'ignore_sticky_posts' => true, 'order' => $instance['order'], 'orderby' => $instance['orderby']);
        if (is_array($instance['category'])) {
            $args_article['category__in'] = $instance['category'];
        }
        if ($just_featured == true) {
            $args_article['meta_key'] = '_kt_post_featured';
            $args_article['meta_value'] = 'yes';
        }
        $r = new WP_Query(apply_filters('widget_posts_args', $args_article));
        if ($r->have_posts()) {
            $layout = !empty($instance['layout']) ? absint($instance['layout']) : 1;
            if (!$layout) {
                $layout = 1;
            }
            echo $args['before_widget'];
            if ($title) {
                echo $args['before_title'] . $title . $args['after_title'];
            }
            ?>
            <ul class="kt_posts_widget kt-artilce-<?php 
            echo esc_attr($layout);
            ?>
">
                <?php 
            while ($r->have_posts()) {
                $r->the_post();
                ?>
                    <li <?php 
                post_class('article-widget clearfix');
                ?>
>
                        <?php 
                if ($layout == 2) {
                    kt_post_thumbnail_image('kt_recent_posts', 'img-responsive');
                } else {
                    kt_post_thumbnail_image('kt_widget_article', 'img-responsive');
                }
                ?>
                        <div class="article-attr">
                            <h3 class="title"><a href="<?php 
                the_permalink();
                ?>
"><?php 
                get_the_title() ? the_title() : the_ID();
                ?>
</a></h3>
                            <?php 
                $layout == 2 ? kt_entry_meta() : kt_entry_date();
                ?>
                        </div>
                    </li>
                <?php 
            }
            ?>
            </ul>
            <?php 
            echo $args['after_widget'];
            // Reset the global $the_post as this query will have stomped on it
            wp_reset_postdata();
        }
    }