?>
<div class="def-carousel sec_style_carousel loading">
<section class="clearfix">
    <ul class="gallery-pics clearfix">
        <?php 
    $gal_post_block = new WP_Query(array('cat' => $module_cat, 'post_type' => 'post', 'showposts' => $module_fetch, 'post__not_in' => $exclude_posts, 'meta_key' => 'rehub_framework_post_type', 'meta_value' => $module_formats, 'ignore_sticky_posts' => 1));
    if ($gal_post_block->have_posts()) {
        while ($gal_post_block->have_posts()) {
            $gal_post_block->the_post();
            ?>
            <li> 
                <a href="<?php 
            the_permalink();
            ?>
" class="gal_post_image"><?php 
            rehub_formats_icons();
            wpsm_thumb('grid_news');
            ?>
</a>
                <h5><a href="<?php 
            the_permalink();
            ?>
"><?php 
            the_title();
            ?>
</a></h5>
                <div class="rcnt_meta">
                    <p><?php 
            if ($module_cat == '') {
                $category = get_the_category($post->ID);
                $module_cat = $category[0]->term_id;
Example #2
0
    function rehub_create_column($size = 'middle')
    {
        ?>
<article class="rething_item small_post inf_scr_item">
    <?php 
        if (function_exists('has_post_thumbnail') && has_post_thumbnail()) {
            ?>
        <figure>
            <?php 
            rehub_formats_icons('full');
            ?>
            <span class="pattern"></span>
            <?php 
            echo getPostLikeLink(get_the_ID());
            ?>
            <?php 
            rehub_permalink();
            ?>
                <?php 
            $img = get_post_thumb();
            $nothumb = get_stylesheet_directory_uri() . '/images/noim.png';
            if ($size == 'middle') {
                $params = array('width' => 381, 'height' => 255, 'crop' => true);
            } elseif ($size == 'small') {
                $params = array('width' => 280, 'height' => 186, 'crop' => true);
            } elseif ($size == 'big') {
                $params = array('width' => 579, 'height' => 386, 'crop' => true);
            } else {
                $params = array('width' => 381, 'height' => 255, 'crop' => true);
            }
            ?>
				<?php 
            if (!empty($img)) {
                ?>
                	<img src="<?php 
                echo bfi_thumb($img, $params);
                ?>
" alt="<?php 
                the_title_attribute();
                ?>
" />
                <?php 
            } else {
                ?>
    
                    <img src="<?php 
                echo $nothumb;
                ?>
" alt="<?php 
                the_title_attribute();
                ?>
" />
                <?php 
            }
            ?>
            </a>
        </figure>                                     
    <?php 
        }
        ?>
    <div class="wrap_thing">
        <div class="top">
            <?php 
        $category = get_the_category(get_the_ID());
        ?>
            <?php 
        if ($category) {
            $first_cat = $category[0]->term_id;
            meta_small(false, $first_cat, false, false);
        }
        ?>
        </div>
        <div class="hover_anons">
            <h2><?php 
        rehub_permalink();
        the_title();
        ?>
</a></h2>
            <div class="post-meta"> <?php 
        meta_small(true, false, true, false);
        ?>
 </div>
            <?php 
        rehub_format_score('small');
        ?>
            <p><?php 
        kama_excerpt('maxchar=320');
        ?>
</p>
        </div>
        <?php 
        rehub_create_btn('yes');
        ?>
    </div>
</article>

<?php 
    }
                </figure>
            </div>
        <?php 
            } else {
                ?>
	
            <div class="right">
                <div class="clearfix">	
                    <figure><a href="<?php 
                the_permalink();
                ?>
"><?php 
                wpsm_thumb('med_thumbs');
                ?>
</a><?php 
                rehub_formats_icons('small');
                ?>
</figure>
                    <div class="detail">
                        <h5><a href="<?php 
                the_permalink();
                ?>
"><?php 
                the_title();
                ?>
</a></h5>
                        <div class="rcnt_meta">
                            <p><?php 
                meta_small(true, false, true);
                ?>
</p>
Example #4
0
<div class="news clearfix<?php 
if (is_sticky()) {
    echo " sticky";
}
?>
">
    <figure>
        <?php 
rehub_formats_icons('full');
?>
        <a href="<?php 
the_permalink();
?>
"><?php 
wpsm_thumb('grid_news');
?>
</a>
    </figure>
    <div class="detail">
	    <h3><?php 
if (is_sticky()) {
    echo "<i class='fa fa-thumb-tack'></i>";
}
?>
<a href="<?php 
the_permalink();
?>
"><?php 
the_title();
?>
</a></h3>
Example #5
0
    /**
     * How to display the widget on the screen.
     */
    function widget($args, $instance)
    {
        extract($args);
        if (is_singular('post')) {
            /* Our variables from the widget settings. */
            $title = apply_filters('widget_title', $instance['title']);
            $number = $instance['number'];
            global $post;
            $category = get_the_category($post->ID);
            $first_cat = $category[0]->term_id;
            $query = array('showposts' => $number, 'nopaging' => 0, 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'cat' => $first_cat, 'meta_key' => 'rehub_review_overall_score', 'orderby' => 'meta_value_num', 'post__not_in' => array($post->ID), 'meta_query' => array(array('key' => 'rehub_framework_post_type', 'value' => 'review', 'compare' => 'LIKE')));
            $loop = new WP_Query($query);
            /* Before widget (defined by themes). */
            echo $before_widget;
            if ($loop->have_posts()) {
                /* Display the widget title if one was input (before and after defined by themes). */
                if ($title) {
                    echo $before_title . $title . $after_title;
                }
                ?>
		<div class="tabs-item clearfix">
		<?php 
                while ($loop->have_posts()) {
                    $loop->the_post();
                    ?>
	
			<div class="clearfix">
	            <figure><?php 
                    wpsm_thumb('med_thumbs');
                    ?>
 <?php 
                    rehub_formats_icons();
                    ?>
</figure>
	            <div class="detail">
		            <h5><a href="<?php 
                    the_permalink();
                    ?>
"><?php 
                    the_title();
                    ?>
</a></h5>
	            	<div class="rcnt_meta">
	                	<?php 
                    meta_small(false, false, true);
                    ?>
	                </div>
		            <?php 
                    rehub_format_score('small');
                    ?>
	            </div>
            </div>	
		<?php 
                }
                ?>
		</div>
		<?php 
                wp_reset_query();
                ?>
		<?php 
            } else {
                ?>
		<?php 
            }
            ?>
	
	<?php 
            /* After widget (defined by themes). */
            echo $after_widget;
        }
    }