-
Notifications
You must be signed in to change notification settings - Fork 1
/
portfolio-big-list-fullwidth.php
64 lines (60 loc) · 2.58 KB
/
portfolio-big-list-fullwidth.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/**
* Template name: Portfolio - big images list without sidebar
*
*/
get_header(); ?>
<div id="main_wrapper">
<?php if($e404_options['breadcrumbs']) : ?><div id="breadcrumb"><?php e404_breadcrumbs(); ?></div><?php endif; ?>
<?php include(OF_FILEPATH.'/portfolio-intro-box.php'); ?>
<div class="portfolio portfolio-list">
<?php
$query = "paged=".$paged."&post_type=portfolio&orderby=menu_order date&posts_per_page=".$e404_options['portfolio_posts_per_page'];
if(isset($taxonomy))
$query .= "&taxonomy=".$taxonomy;
if(isset($term))
$query .= "&term=".$term;
$custom_query = new WP_Query($query);
if($custom_query->have_posts()) : while ($custom_query->have_posts()) : $custom_query->the_post(); ?>
<div id="post-<?php the_ID(); ?>" class="portfolio-item">
<div class="two_third">
<?php
if (has_post_thumbnail()) {
$large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full');
$img_shortcode = '[image border="true" shadow="true" align="none" title="'.the_title_attribute('echo=0').'" size="huge"';
if($e404_options['portfolio_prettyphoto'])
$img_shortcode .= ' lightbox="true"';
else
$img_shortcode .= ' href="'.get_permalink().'"';
$img_shortcode .= ']'.$large_image_url[0].'[/image]';
echo do_shortcode($img_shortcode);
} ?>
</div>
<div class="one_third last">
<?php if($e404_options['portfolio_titles']) : ?><h3><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3><?php endif; ?>
<?php if($e404_options['portfolio_item_categories']) : ?>
<div class="portfolio-meta">
<div class="posted-meta"><?php the_terms($post->ID, 'portfolio-category', '', ', '); ?></div>
</div>
<?php endif; ?>
<?php the_excerpt(''); ?>
<?php if(!is_single() && $e404_options['portfolio_read_more']) : ?>
<p class="more"><a href="<?php the_permalink(); ?>"><?php echo($e404_options['portfolio_read_more_text']); ?></a></p>
<?php endif; ?>
</div>
<br class="clear" />
</div>
<?php endwhile; wp_reset_query();
else :
_e('Nothing Found', 'cold');
endif; ?>
</div>
<?php if(function_exists('wp_pagenavi'))
wp_pagenavi(array('query' => $custom_query));
else { ?>
<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'cold'), $custom_query->max_num_pages ); ?></div>
<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'cold') ); ?></div>
<?php } ?>
<br class="clear" />
</div>
<?php get_footer(); ?>