Exemple #1
0
while ($my_query->have_posts()) {
    $my_query->the_post();
    $the_post_ids = get_the_ID();
    $the_post_title = get_the_title();
    $do_not_duplicate = $post->ID;
    ?>


<div class="sbox">
<div class="simg">
<div class="img-services">
<a href="<?php 
    the_permalink();
    ?>
"><?php 
    wp_custom_post_thumbnail($the_post_id = $the_post_ids, $with_wrap = '', $wrap_w = '', $wrap_h = '', $title = get_the_title(), $fetch_size = 'medium', $fetch_w = '260', $fetch_h = 'auto', $alt_class = 'feat-thumb');
    ?>
</a>
</div>
</div>
<h3><?php 
    echo the_title();
    ?>
</h3>
<p>
<?php 
    the_excerpt_feature($excerpt_length = 20);
    ?>
...
<span class="learn-more"><a href="<?php 
    the_permalink();
Exemple #2
0
    function widget($args, $instance)
    {
        global $bp_existed, $post;
        // outputs the content of the widget
        extract($args);
        // Make before_widget, etc available.
        $feat_title = empty($instance['title']) ? __('Featured Categories', TEMPLATE_DOMAIN) : apply_filters('widget_title', $instance['title']);
        $feat_name = $instance['featcatname'];
        $feat_thumb = $instance['featthumb'];
        $feat_total = $instance['feattotal'];
        $unique_id = $args['widget_id'];
        echo $before_widget;
        echo $before_title . $feat_title . $after_title;
        echo "<ul class='item-list' id='recent-postcat'>";
        $my_query = new WP_Query('cat=' . $feat_name . '&' . 'showposts=' . $feat_total);
        while ($my_query->have_posts()) {
            $my_query->the_post();
            $do_not_duplicate = $post->ID;
            $the_post_ids = get_the_ID();
            ?>

<li>
<?php 
            if ($feat_thumb == 'yes') {
                wp_custom_post_thumbnail($the_post_id = $the_post_ids, $with_wrap = '', $wrap_w = '', $wrap_h = '', $title = get_the_title(), $fetch_size = 'thumbnail', $fetch_w = '', $fetch_h = '', $alt_class = '');
            }
            ?>
<div class="feat-title"><a href="<?php 
            the_permalink();
            ?>
" rel="bookmark" title="<?php 
            the_title();
            ?>
"><?php 
            the_title();
            ?>
</a></div>
<small><?php 
            _e('by', TEMPLATE_DOMAIN);
            ?>
&nbsp;<?php 
            if ($bp_existed == 'true') {
                printf(__('%s', TEMPLATE_DOMAIN), bp_core_get_userlink($post->post_author));
            } else {
                the_author_posts_link();
            }
            ?>
&nbsp;<?php 
            _e('on', TEMPLATE_DOMAIN);
            ?>
&nbsp;<?php 
            the_time('F jS Y');
            ?>
</small>
</li>
<?php 
        }
        echo "</ul>";
        echo $after_widget;
        // end echo result
    }
Exemple #3
0
                ?>

<?php 
                wp_custom_post_thumbnail($the_post_id = $the_post_ids, $with_wrap = 'no', $wrap_w = '', $wrap_h = '', $title = get_the_title(), $fetch_size = 'large', $fetch_w = '600', $fetch_h = '200', $alt_class = 'full feat-thumb');
                ?>

<?php 
            }
            ?>

<?php 
        } else {
            ?>

<?php 
            wp_custom_post_thumbnail($the_post_id = $the_post_ids, $with_wrap = 'no', $wrap_w = '', $wrap_h = '', $title = get_the_title(), $fetch_size = 'large', $fetch_w = '600', $fetch_h = '200', $alt_class = 'full feat-thumb');
            ?>

<?php 
        }
        ?>

<?php 
    }
    ?>

<?php 
}
?>

</div>