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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<?php
/*
Template Name: Portfolio
*/
get_header(); 
$page_footer_widget=get_post_meta($post->ID, 'rt_page_footer_widget', true);
?>
<?php 
if (get_option('rttheme_style')){
  $which_theme=get_option('rttheme_style');
}else{
  $which_theme="1";    
}
?>
    <!-- sub page header-->
    <div id="sub_page_header">
      <div class="left">  
      <!-- Page navigation-->
        <div id="sub_nav">
          <!-- [rt-breadcrumb] -->
            <?php  rt_breadcrumb(); ?>
          <!--/ [rt-breadcrumb] -->
        </div>
      <!-- /Page navigation-->
      </div>
      <div class="right"></div>
    </div>
    <!-- /sub page header-->


<!-- Page -->

      <div class="sub_page clean">
      <?php
        $more = 0;

        if($cat){
          $query_string = "showposts=".get_option('rttheme_portf_pager')."&cat=$cat&paged=$paged";
        }else{
          $query_string = "showposts=".get_option('rttheme_portf_pager')."&cat=".get_option('rttheme_portf_ex_cat[]')."&paged=$paged";
        }
        query_posts($query_string);
      ?>

            <?php

      $box_counter=0;      
      if (have_posts()) : while (have_posts()) : the_post();?>




        <!-- box -->
        <div class="box">
          <!-- portfolio image for videos -->

            <?php
            if (preg_match("/(png|jpg|gif)/", get_post_meta($post->ID, 'rt_portfolio_image', true))) {
              $button="magnifier";
            } else {
              $button="play";
            }
            ?>


          <div class="imgarea <?php if(get_post_meta($post->ID, 'rt_portfolio_image', true)):?><?php echo $button;?><?php endif;?>">
                <?php if(get_post_meta($post->ID, 'rt_portfolio_image', true)):?>
                        <a href="<?php echo get_permalink() ?>" title="">
                <?php endif;?>

                    <?php if(get_post_meta($post->ID, 'rt_portfolio_thumb_image', true)):?>                  
                        <img src="<?php echo get_post_meta($post->ID, 'rt_portfolio_thumb_image', true);?>" alt="" class="image portfolio"  />
                    <?php else:?>
                        <img src="<?php bloginfo('template_directory'); ?>/timthumb.php?src=<?php echo get_post_meta($post->ID, 'rt_portfolio_image', true)?>&amp;w=290&amp;h=124&amp;zc=1" alt="" class="image portfolio" />
                    <?php endif;?>

                <?php if(get_post_meta($post->ID, 'rt_portfolio_image', true)):?>
                        </a>
                <?php endif;?>
          </div>
          <!-- portfolio image-->
          <div class="textarea">
            <!-- portfolio title-->
            <h2><a href="<?php echo get_permalink() ?>" title=""><?php the_title(); ?></a></h2>
              <!-- text-->
              <?php echo get_post_meta($post->ID, 'rt_portfolio_desc', true);?><br />
              <a href="<?php echo get_permalink() ?>" class="read_more">read more</a>
          </div>
        </div>
      <!-- /box -->

      <?php
        $box_counter++;
        if ($box_counter==3){echo "<div class=\"clear_space\"></div>";$box_counter=0;}
      ?>

      <?php endwhile; ?>
      <!-- /portfolio boxes -->
      <div class="clear_space_h"></div>


        <!-- portfolio paging-->
        <div id="paging">
          <ul>
            <?php get_pagination(); ?>
          </ul>
        </div>
        <!-- /portfolio paging-->
      <?php else: ?>
        <p>Sorry, no posts matched your criteria.</p>
      <?php endif; ?>

    </div>
    <div class="clear_space_h"></div>
  </div>
  </div>
  <div class="clear_space"></div>
</div>
<?php get_footer();?>