Advertisement
Guest User

Untitled

a guest
Aug 16th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.35 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: Portfolio
  4. */
  5. ?>
  6. <?php get_header(); ?>
  7. <?php global $woo_options; ?>
  8.  
  9. <div id="content" class="col-full">
  10.  
  11. <div id="main" class="fullwidth">
  12.  
  13. <?php if ( function_exists('yoast_breadcrumb') ) { yoast_breadcrumb('<div id="breadcrumb"><p>','</p></div>'); } ?>
  14.  
  15. <div id="portfolio" class="col-full">
  16.  
  17. <!-- Tags -->
  18. <?php if ( $woo_options['woo_portfolio_tags'] ) { ?>
  19. <div id="port-tags">
  20. <div class="fl">
  21. <?php
  22. $tags = explode(',',$woo_options['woo_portfolio_tags']); // Tags to be shown
  23. foreach ($tags as $tag){
  24. $tag = trim($tag);
  25. $displaytag = $tag;
  26. $tag = str_replace (" ", "-", $tag);
  27. $tag = str_replace ("/", "-", $tag);
  28. $tag = strtolower ( $tag );
  29. $link_tags[] = '<a href="#" rel="'.$tag.'">'.$displaytag.'</a>';
  30. }
  31. $new_tags = implode(' ',$link_tags);
  32. ?>
  33. <span class="port-cat"><?php _e('Select a category:', 'woothemes'); ?>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" rel="all"><?php _e('All','woothemes'); ?></a>&nbsp;<?php echo $new_tags; ?></span>
  34. </div>
  35. <div class="fix"></div>
  36. </div>
  37.  
  38. <?php } ?>
  39. <!-- /Tags -->
  40.  
  41. <?php //do_action('wp_dribbble'); ?>
  42.  
  43. <ol class="portfolio dribbbles">
  44.  
  45. <?php if ( get_query_var('paged') ) $paged = get_query_var('paged'); elseif ( get_query_var('page') ) $paged = get_query_var('page'); else $paged = 1; ?>
  46. <?php
  47. $args = array(
  48. 'post_type' => 'portfolio',
  49. 'paged' => $paged,
  50. 'meta_key' => 'portfolio-image',
  51. 'posts_per_page' => -1
  52. );
  53. query_posts( $args );
  54. ?>
  55. <?php if (have_posts()) : $count = 0; while (have_posts()) : the_post(); $count++; ?>
  56.  
  57. <?php
  58. // Portfolio tags class
  59. $porttag = "";
  60. $posttags = get_the_tags();
  61. if ($posttags) {
  62. foreach($posttags as $tag) {
  63. $tag = $tag->name;
  64. $tag = str_replace (" ", "-", $tag);
  65. $tag = str_replace ("/", "-", $tag);
  66. $tag = strtolower ( $tag );
  67. $porttag .= $tag . ' ';
  68. }
  69. }
  70. ?>
  71.  
  72. <li class="group <?php echo $porttag; ?>">
  73. <div class="dribbble">
  74. <div class="dribbble-shot">
  75. <div class="portfolio-img dribbble-img">
  76. <a href="<?php the_permalink(); ?>" class="dribbble-link"><?php woo_image('key=portfolio-image&width=200&height=150&link=img'); ?></a>
  77. <a href="<?php the_permalink(); ?>" class="dribbble-over"><strong><?php the_title(); ?></strong>
  78. <!-- <span class="dim">Your Player Name</span> -->
  79. <em><?php the_time( get_option( 'date_format' ) ); ?></em>
  80. </a>
  81.  
  82. </div>
  83. </div>
  84. </div>
  85. </li>
  86. <?php if ($count == 4): ?><div class="fix"></div><?php $count = 0; endif; ?>
  87. <?php endwhile; else: ?>
  88. <div class="post">
  89. <p><?php _e('Sorry, no posts matched your criteria.', 'woothemes') ?></p>
  90. </div><!-- /.post -->
  91. <?php endif; ?>
  92.  
  93. </ol>
  94.  
  95. </div><!-- /#portfolio -->
  96.  
  97. <?php woo_pagenav(); ?>
  98. </div><!-- /#main -->
  99.  
  100. </div><!-- /#content -->
  101.  
  102. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement