Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Template Name: Magazine – Group
- *
- *
- * @package CoLabsFramework
- * @subpackage Template
- */
- get_header();?>
- <div class="sliiide row">
- <?php
- $headline=get_option('colabs_headline');
- // WPML support
- echo "Headline category: " . $headline;
- function lang_category_id($id){
- if(function_exists('icl_object_id')) {
- return icl_object_id($id,'category',true);
- } else {
- return $id;
- }
- }
- echo "lang_category_id:<pre>"; print_r(lang_category_id($headline)); echo "</pre>";
- //\ WPML support
- query_posts('showposts=5&cat='.$headline);
- if ( have_posts() ):
- ?>
- <div class="column col8">
- <div class="box-slide">
- <div class="flex-container">
- <div class="flexslider">
- <ul class="slides">
- <?php while ( have_posts() ) : the_post(); ?>
- <li>
- <?php colabs_image('width=600&height=201&play=true&class=pic-slide');?>
- <div class="shadow"></div>
- <div class="editor">
- <?php
- $email = get_the_author_email();
- echo get_avatar($email,42);?>
- <span class="meta"><?php _e('Posted by','colabsthemes');?><br/>
- <?php the_author_posts_link(); ?>
- <hr/>
- <img src="<?php bloginfo("template_url")?>/images/folder-icon.png" alt="Category" class="icon" /> <?php _e('Category','colabsthemes');?> : <br/>
- <?php the_category(' ,');?></span>
- </div>
- <div class="post-slide">
- <h2><a href="<?php the_permalink();?>"><?php the_title();?></a></h2>
- <p class="meta"><img src="<?php bloginfo("template_url")?>/images/date-icon.png" alt="Category" class="icon" /> <?php the_time('F j, Y');?> | <a href="<?php comments_link(); ?>"><?php comments_number( __('Add Comment','colabsthemes'), __('1 Comment','colabsthemes'), __('% Comments','colabsthemes') ); ?></a></p>
- <?php colabs_custom_excerpt();?>
- </div>
- </li>
- <?php endwhile; ?>
- </ul>
- </div><!– .flexslider –>
- </div><!– .flex-container –>
- </div>
- <div class="shadow-slide"></div>
- </div>
- <?php endif;?>
- <div class="column col4">
- <?php
- /* Tabs Widget */
- $tabs = new CoLabs_Tabs();
- $args = array(
- 'before_title' => '',
- 'after_title' => '',
- 'before_widget' => '<div class="widget_colabs_tabs">',
- 'after_widget' => '</div>'
- );
- $instance = array(
- 'number' => 4,
- 'thumb_size' => 62
- );
- $tabs->widget( $args, $instance );
- ?>
- <!– /widget colabsTabs –>
- </div><!– /column row –>
- </div><!– /sliiide –>
- <?php
- $highlight=get_option('colabs_highlight');
- $count=count($highlight);
- if ($highlight){
- ?>
- <div class="highlights row">
- <?php
- $postnotin=array();
- for($i=0;$i<$count;$i++){
- query_posts('showposts=1&category__in='.$highlight[$i]);
- while ( have_posts() ) : the_post();
- ?>
- <div class="column col3">
- <div class="hlight-post">
- <p class="cat"><?php the_category(' ,');?><br/>
- <span class="date"><?php the_time('j F Y');?></span></p>
- <a href="<?php the_permalink();?>"><?php colabs_image('width=340&height=234&play=true');?></a>
- <h2><a href="<?php the_permalink();?>"><?php the_title();?></h2></a>
- </div>
- </div>
- <?php
- $postnotin[]=$post->ID;
- endwhile;
- }
- ?>
- </div><!– /highlight –>
- <?php }?>
- <div class="main row magazine-group">
- <div class="content <?php if(get_option('colabs_layout_settings')=='two-col-right'){echo 'fr';}else{?>column<?php }?> col8">
- <?php
- $categories = get_categories('orderby=order&echo=0&style=none&exclude='.$headline);
- foreach ($categories as $item) :
- ?>
- <div class="cat-group row"><h3 class="cat-title"><?php echo $item->name; ?></h3>
- <?php
- $postslist = query_posts( array (
- 'category_name' => $item->slug,
- 'numberposts' => 5,
- 'post__not_in' => $postnotin,
- 'paged' => $paged
- ));
- $count = 0;?>
- <div class="post clearfix">
- <?php
- foreach ($postslist as $post) :
- $count++;
- ?>
- <?php if( $count == 1 ){ ?>
- <div class="column col3">
- <?php colabs_image('width=130&height=83&play=true&class=img-feat');?>
- <p class="entry-meta">
- <?php the_time('j F Y');?> <img src="<?php bloginfo("template_url")?>/images/date-icon.png" alt="" /><br/>
- <?php the_author_posts_link(); ?> <img src="<?php bloginfo("template_url")?>/images/author-icon.png" alt="" /><br/>
- <?php the_category(' ,');?><img src="<?php bloginfo("template_url")?>/images/folder-icon.png" alt="" /><br/>
- </p>
- </div>
- <div class="column col9">
- <h2 class="entry-header"><a href="<?php the_permalink();?>"><?php the_title();?></a></h2>
- <div class="entry-content">
- <?php colabs_custom_excerpt();?>
- </div>
- </div>
- <div class="clear"></div>
- <?php }else{ ?>
- <div class="related clearfix">
- <div class="column col3">
- <p class="entry-meta"><?php the_time('j F Y');?></p>
- </div>
- <div class="column col9">
- <h4 class="entry-header"><a href="<?php the_permalink();?>"><?php the_title();?></a></h4>
- </div>
- </div>
- <?php } ?>
- <?php
- endforeach;
- ?>
- </div><!– .post –>
- </div><!– .cat-group –>
- <?php
- endforeach;
- ?>
- <!– Gunakan struktur html ini untuk membuat pagination –>
- <?php colabs_pagination();?><!– .pagination –>
- <?php //else: ?>
- <!–div class="post">
- <h2><?php _e('No posts found. Try a different search?','colabsthemes');?></h2>
- </div–>
- <?php //endif;?>
- </div>
- <?php get_sidebar();?><!– .sidebar –>
- <?php get_footer();?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement