/** * Front-end display of widget. * * @see WP_Widget::widget() * * @param array $args Widget arguments. * @param array $instance Saved values from database. */ public function printWidget($args, $instance) { // Get URL global $wp; $url = add_query_arg($wp->query_string, '', home_url($wp->request)); $title = the_title_attribute(['echo' => 0]) . ' from ' . get_bloginfo('name'); // Get meta information $desc = \Proud\Core\wp_trim_excerpt('', false, true); ?> <!--<div class="dropdown share">--> <a href="#" id="share-dropdown" data-toggle="dropdown"><i class="fa fa-fw fa-share-alt"></i>Share <!--<span class="caret"></span>--></a> <ul class="dropdown-menu" aria-labelledby="share-dropdown"> <li><a href="https://www.facebook.com/sharer/sharer.php" target="_blank"><i class="fa fa-facebook-square fa-fw"></i> Facebook</a></li> <li><a href="http://twitter.com/share"><i class="fa fa-twitter-square fa-fw"></i> Twitter</a></li> <li><a href="mailto:?subject=<?php print urlencode($title); ?> &body=Read more: <?php print urlencode($url); ?> "><i class="fa fa-envelope fa-fw"></i> Email</a> </ul> <!--</div>--> <?php }
<div <?php post_class("featured"); ?> > <?php if (has_post_thumbnail()) { ?> <div class="image"> <a href="<?php echo esc_url(get_permalink()); ?> "><?php the_post_thumbnail('large'); ?> </a> </div> <?php } ?> <?php the_title(sprintf('<h4 class="entry-title"><a href="%s" rel="bookmark">', esc_url(get_permalink())), '</a></h4>'); ?> <p class="muted margin-bottom-none"><?php echo get_the_date(); ?> </p> <p class="featured-caption"><?php echo \Proud\Core\wp_trim_excerpt('', true, false, 15); ?> </p> </div>
<div <?php post_class("teaser search-teaser"); ?> > <div class="row"> <div class="col-md-12"> <div class="search-title"> <h4 class="entry-title margin-top-large"><?php echo $proudsearch->get_post_link($post); ?> </h4> <i class="fa fa-2x <?php echo $search_meta['icon']; ?> "></i> </div> <p><?php echo \Proud\Core\wp_trim_excerpt('', false, true); ?> </p> <?php echo $proudsearch->get_post_link($post, 'See more'); ?> </div> </div> </div>
<div <?php post_class("teaser"); ?> > <div class="row"> <?php if (has_post_thumbnail()) { ?> <div class="col-md-3 pull-right"> <?php the_post_thumbnail(); ?> </div> <?php } ?> <div class="col-md-9 pull-left"> <?php the_title(sprintf('<h4 class="entry-title"><a href="%s" rel="bookmark">', esc_url(get_permalink())), '</a></h4>'); ?> <p class="muted"><?php echo get_the_date(); ?> </p> <?php echo \Proud\Core\wp_trim_excerpt(); ?> </div> </div> </div>