Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $template = get_post_meta( get_the_ID(), 'wpzoom_post_template', true );
- $is_recipe = in_category('Resep');
- if ($template == 'full') {
- $media_width = 980;$media_height = 554;$size = "post-full";}
- else {
- $media_width = 638;$media_height = 270;$size = "photo";}
- ?>
- <?php get_header(); ?>
- <div id="content-wrap"<?php
- if ($template == 'side-left') { echo " class=\"side-left\""; }
- if ($template == 'full') { echo " class=\"full-width\""; }
- ?>>
- <div id="content">
- <div class="post_content">
- <?php wp_reset_query(); if (have_posts()) : while (have_posts()) : the_post(); ?>
- <div id="post-<?php the_ID(); ?>" class="clearfix">
- <?php if ($is_recipe) {echo '<div class="hrecipe">';}
- $attachment_id = get_post_thumbnail_id( $post_id ); $image_attributes = wp_get_attachment_image_src( $attachment_id, full );
- if ( ( $is_recipe && ( $image_attributes[1] >= 600)) ) {
- get_the_image( array( 'size' => $size, 'width' => $media_width, 'height' => $media_height, 'before' => '<div class="post-thumb">', 'after' => '<p>'.get_post(get_post_thumbnail_id())->post_excerpt.'</p></div>', 'link_to_post' => false ) );
- }
- if ($is_recipe) {
- ?>
- <h1 class="entry-title fn pf-title"><a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>">Resep <?php the_title(); ?></a></h1>
- <?php } else { ?>
- <h1 class="entry-title fn pf-title"><a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
- <?php } ?>
- $foto = $image_attributes[0]; ?>
- <div class="entry entry-content <?php if ($image_attributes[1] < 600) { echo 'ouder'; } if (!$is_recipe) {echo ' non-resep';} ?>">
- <?php if ($image_attributes[1] < 600 ) { ?>
- <img class="photo" src="<?php echo $foto; ?>" width="240px" alt="<?php the_title(); ?>" title="<?php the_title(); ?>"/>
- <?php } else {}?>
- <span class="clear"></span>
- <?php the_content(); ?>
- <div class="cleaner"> </div>
- </div>
- <!-- / .entry -->
- <?php if ($is_recipe) {echo '</div> <!-- / .hrecipe -->';} ?>
- </div>
- <!-- #post-<?php the_ID(); ?> -->
- <?php
- endwhile; else: ?>
- <p>
- <?php _e('Sorry, no posts matched your criteria', 'wpzoom');?>
- .</p>
- <?php endif; ?>
- <div class="cleaner"> </div>
- </div>
- <!-- / .post_content -->
- </div>
- <!-- / #content -->
- <?php if ($template != 'full') { get_sidebar(); } ?>
- <div class="cleaner"> </div>
- </div>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement