Beispiel #1
0
                            </div>
                            <div class="blog-box-inner">
                                <header class="entry-header">
                                    <h3><?php 
the_title();
?>
</h3>
                                </header><!-- entry header /- -->
                                <footer class="entry-footer">
                                    <span class="byline">
                                        <span class="screen-reader-text"><?php 
_e('BY', KC_DOMAIN);
?>
 </span>
                                        <?php 
echo author_link();
?>
                                    </span>
                                    <span class="byline">
                                        <span class="screen-reader-text"><?php 
_e('Like', KC_DOMAIN);
?>
</span>
                                        <a href="#"><?php 
echo wp_count_comments()->total_comments;
?>
</a>
                                    </span>
                                    <span class="byline">
                                        <span class="screen-reader-text"><?php 
$cats = wp_get_post_categories(get_the_ID());
Beispiel #2
0
        the_permalink();
        ?>
"><?php 
        the_title();
        ?>
</a></h3>
                                        </header><!-- entry header /- -->

                                        <footer class="entry-footer">
                                            <span class="byline">
                                                <span class="screen-reader-text"><?php 
        __('BY', KC_DOMAIN);
        ?>
 </span>
                                                <?php 
        author_link();
        ?>
                                            </span>
                                            <span class="byline">
                                                <span class="screen-reader-text">Likes </span>
                                                <a title="Likes" href="#"><?php 
        echo rand(1, 100);
        ?>
</a>
                                            </span>
                                            <span class="byline">
                                                <span class="screen-reader-text"><?php 
        single_cat_title();
        ?>
 </span>
                                            </span>
Beispiel #3
0
 function vc_latest_news_function($atts, $content = null)
 {
     $output = '';
     extract(shortcode_atts(array('lastest_news_title' => '', 'latest_news_icon' => '', 'select_categories' => '', 'lastest_news_button' => '', 'lastest_news_view_all' => '', 'count_word' => '', 'extra_class' => ''), $atts));
     $output .= '<div id="blog-section" class="blog-section ow-section ' . $extra_class . '">';
     $output .= '<div class="container">';
     $output .= '<div class="section-header">';
     $output .= '<h3><img src="' . wp_get_attachment_url($latest_news_icon) . '" alt="sep-icon" />' . $lastest_news_title . '</h3>';
     $output .= '</div>';
     $output .= '';
     if (is_numeric($select_categories) && $select_categories >= 0) {
         $list_post = get_posts(['category' => $select_categories, 'posts_per_page' => 2]);
         foreach ($list_post as $post) {
             setup_postdata($post);
             $content = get_the_content();
             $output .= '<article class="col-md-6 col-sm-12">';
             $output .= '<div class="blog-box">';
             $output .= '<div class="blog-box-inner">';
             $output .= '<header class="entry-header">';
             $output .= '<h3><a title="' . get_the_title($post->ID) . '" href="' . get_post_permalink($post->ID) . '">' . get_the_title($post->ID) . '</a></h3>';
             $output .= '</header>';
             $output .= '<footer class="entry-footer">';
             $output .= '<span class="byline">';
             $output .= '<span class="screen-reader-text">' . __('BY', KC_DOMAIN) . ' </span>';
             $output .= author_link();
             $output .= '</span> ';
             $output .= '<span class="byline">';
             $output .= '<span class="screen-reader-text">' . __('Likes', KC_DOMAIN) . ' </span>';
             $output .= '<a title="Likes" href="#">23</a> </span>';
             $output .= '</footer>';
             $output .= '<div class="entry-content">';
             $output .= '<p>' . the_excerpt_max_charlength($content, $count_word) . ' ...</p>';
             $output .= '</div>';
             $output .= '<a title="' . $lastest_news_button . '" href="' . get_post_permalink($post->ID) . '">' . $lastest_news_button . '</a>';
             $output .= '</div>';
             $output .= '<div class="entry-cover pull-right last-new-home">';
             $output .= '<a title="' . $post->post_title . '" href="' . get_post_permalink($post->ID) . '" >' . get_the_post_thumbnail($post->ID, "medium") . ' </a>';
             $output .= '<span class="posted-on">';
             $output .= '<span class="like">' . wp_count_comments($post->ID)->total_comments . '</span>';
             $output .= '<span class="date">' . get_the_date('d/m/Y', $post->ID) . '</span>';
             $output .= '</span>';
             $output .= '</div>';
             $output .= '</div> </article>';
         }
     }
     $output .= '<a href="' . get_category_link($select_categories) . '" class="btn">' . $lastest_news_view_all . '</a>';
     $output .= '</div> </div>';
     return $output;
 }