Ejemplo n.º 1
0
    ?>
            <div class="block_top"><div class="block_cat"><a href="<?php 
    echo $category_link;
    ?>
" title="<?php 
    echo $option['amp_block4'];
    ?>
"><?php 
    echo $option['amp_block4'];
    ?>
</a></div></div>
            
				<div class="block_mid">
                <!--CALL TO POST IMAGE-->
                <?php 
    $cti = amphion_lite_catch_that_image();
    ?>
            	<?php 
    if (has_post_thumbnail()) {
        ?>
                <div class="imgwrap"><div class="block_comm"><?php 
        if (!empty($post->post_password)) {
            ?>
        	<?php 
        } else {
            ?>
<div class="comments"><?php 
            comments_popup_link('0', '1', '%', '', __('Off'));
            ?>
</div><?php 
        }
Ejemplo n.º 2
0
    /**
     * How to display the widget on the screen.
     */
    function widget($args, $instance)
    {
        extract($args);
        /* Our variables from the widget settings. */
        $numberposts = $instance['numberposts'];
        /* Before widget (defined by themes). */
        echo $before_widget;
        ?>
                <h2>Popular Posts</h2>
                <div class="widget_wrap">
                <ul>
                <?php 
        query_posts('orderby=comment_count&posts_per_page=' . $numberposts);
        ?>
                <?php 
        if (have_posts()) {
            while (have_posts()) {
                the_post();
                ?>
                <li>
                    <!--CALL TO POST IMAGE-->
                    <?php 
                $cti = amphion_lite_catch_that_image();
                ?>
                    <?php 
                if (has_post_thumbnail()) {
                    ?>
                    <div class="pop_img_wrap"><?php 
                    the_post_thumbnail('thumbnail');
                    ?>
</div>
                    
                    
                    <?php 
                } elseif (isset($cti)) {
                    ?>
                    <div class="pop_img_wrap"><img src="<?php 
                    echo $cti;
                    ?>
" alt="Link to <?php 
                    the_title();
                    ?>
" class="thumbnail"/></div>
                
                    <?php 
                } else {
                    ?>
                    <div class="pop_frame"></div>
                             
                    <?php 
                }
                ?>

                    <a class="poptitle" href="<?php 
                the_permalink();
                ?>
"><?php 
                the_title();
                ?>
</a>
                    <p><?php 
                excerpt('12');
                ?>
</p>

                    
				<?php 
            }
            ?>
                <?php 
        }
        ?>
                <?php 
        wp_reset_query();
        ?>
</li></ul>

                                

<?php 
        echo $after_widget;
    }