Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * The main template file for display category page.
- *
- * @package WordPress
- * @subpackage Pim
- */
- get_header();
- ?>
- <!-- Begin content -->
- <div id="content_wrapper">
- <?php
- // If is category or subcategory of $cat_id
- if (!function_exists('is_category_or_sub')) {
- function is_category_or_sub($cat_id = 0) {
- foreach (get_the_category() as $cat) {
- if ($cat_id == $cat->cat_ID || cat_is_ancestor_of($cat_id, $cat)) return true;
- }
- return false;
- }
- }
- ?>
- <?php if (is_category_or_sub(4)) : ?>
- <?php load_template(TEMPLATEPATH . '/cat_videopagine.php'); ?>
- <?php else : ?>
- <div class="inner">
- <!-- Begin main content -->
- <div class="two_third large">
- <div class="sidebar_content">
- <?php peerapong_breadcrumbs(); ?><br/>
- <?php
- if (have_posts()) : while (have_posts()) : the_post();
- ?>
- <!-- Begin each blog post -->
- <div class="post_wrapper">
- <div class="post_header">
- <div style="float:left; width:85%">
- <h2 class="cufon">
- <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
- <?php the_title(); ?>
- </a>
- </div> </h2>
- <div class="date_post">
- <?php
- $x = get_custom_field('datapub');
- $time = strtotime($x);
- print date('d', $time);
- ?>
- <div style="border-top:1px solid #000;"><?php print date('M', $time); ?></div>
- </div>
- </div>
- <br class="clear"/>
- <div class="post_img">
- <?php
- if( get_post_meta(get_the_ID(), 'blog_thumb_image_url', true) ) :
- $image_thumb = get_post_meta(get_the_ID(), 'blog_thumb_image_url', true);
- ?>
- <img class="alignleft" src="<?php echo get_bloginfo( 'stylesheet_directory' ); ?>/timthumb.php?src=<?php echo $image_thumb; ?>&h=149&w=220&zc=1" alt="" />
- <?php endif;?>
- <?php
- print_custom_field('videopreview:wrapper'
- , '<iframe class="alignleft" width="220" height="179" src="[+content+]" frameborder="0" allowfullscreen></iframe>'
- , '<em></em>');
- ?>
- <?php new_excerpt(300); ?>
- </div>
- <br class="clear"/>
- </div>
- <!-- End each blog post -->
- <?php endwhile; endif; ?>
- <div class="pagination"><p><?php posts_nav_link(' '); ?></p></div>
- </div>
- </div>
- <div class="one_fourth home last">
- <div class="sidebar">
- <div class="content">
- <ul class="sidebar_widget">
- <?php dynamic_sidebar('Rubriche Sidebar'); ?>
- </ul>
- </div>
- </div>
- </div>
- </div>
- <!-- End main content -->
- <?php endif; ?>
- </div>
- <br class="clear"/>
- <!-- End content -->
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement