示例#1
0
?>

<div id="content" class="span8">
    <div class="padder">
        <div class="clear"></div>

        <?php 
do_action('bp_before_blog_home');
?>

        <?php 
if ($cap->posts_lists_style_home == 'magazine') {
    $args = array();
    $args['amount'] = get_option('posts_per_page', 9);
    $args['img_position'] = cc_get_magazine_style($cap->magazine_style_home);
    echo cc_list_posts($args);
    ?>

            <div class="navigation">
                <div class="alignleft"><?php 
    next_posts_link(__('&larr; Previous Entries', 'cc'));
    ?>
</div>
                <div class="alignright"><?php 
    previous_posts_link(__('Next Entries &rarr;', 'cc'));
    ?>
</div>
            </div>
        <?php 
} else {
    // blog
 /**
  * homepage: add the latest 3 posts to the default homepage in mouse-over magazine style
  *
  * located: index.php do_action( 'bp_before_blog_home' )
  *
  * @package Custom Community
  * @since 1.8.3
  */
 function default_homepage_last_posts()
 {
     global $cap;
     if ($cap->preview == true || $cap->default_homepage_last_posts == 'show' || $cap->default_homepage_last_posts == __('show', 'cc')) {
         $args = array('amount' => '3', 'is_home_last_posts' => true);
         echo '<div class="default-homepage-last-posts">' . cc_list_posts($args) . '</div>';
     }
 }
/**
 * load the array for the list posts depending on the page settings or theme settings
 *
 * @package Custom Community
 * @since 1.8.3
 */
function cc_list_posts_on_page()
{
    $cc_page_options = cc_get_page_meta();
    if (isset($cc_page_options) && isset($cc_page_options['cc_page_template_on']) && $cc_page_options['cc_page_template_on'] == 1) {
        $atts = array('amount' => $cc_page_options['cc_page_template_amount'], 'category__in' => $cc_page_options['cc_page_template_cat']);
        switch ($cc_page_options['cc_posts_on_page_type']) {
            case 'img-mouse-over':
                $atts['img_position'] = 'mouse_over';
                break;
            case 'img-left-content-right':
                $atts['img_position'] = 'left';
                break;
            case 'img-right-content-left':
                $atts['img_position'] = 'right';
                break;
            case 'img-over-content':
                $atts['img_position'] = 'over';
                break;
            case 'img-under-content':
                $atts['img_position'] = 'under';
                break;
        }
        echo cc_list_posts($atts, $content = null);
    }
}
示例#4
0
                        <?php 
    printf(__('You are browsing the Blog for %1$s.', 'cc'), wp_title(false, false));
    ?>
                    <?php 
}
?>
                </h3>
            </header>

            <?php 
if (!empty($args)) {
    $args['amount'] = get_option('posts_per_page', 9);
    ?>

                <?php 
    echo '<div class="archive-last-posts">' . cc_list_posts($args) . '</div>';
    ?>

                <div class="navigation">
                    <div class="alignleft"><?php 
    next_posts_link(__('&larr; Previous Entries', 'cc'));
    ?>
</div>
                    <div class="alignright"><?php 
    previous_posts_link(__('Next Entries &rarr;', 'cc'));
    ?>
</div>
                </div>
            <?php 
} else {
    ?>