Advertisement
lordmarcio

Untitled

Jun 8th, 2012
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.52 KB | None | 0 0
  1. <?php
  2. /**
  3. * @package WordPress
  4. * @subpackage u-design
  5. */
  6.  
  7. global $udesign_options;
  8.  
  9. // construct an array of portfolio categories
  10. $portfolio_categories_array = explode( ',', $udesign_options['portfolio_categories'] );
  11. if ( $portfolio_categories_array != "" && post_is_in_category_or_descendants( $portfolio_categories_array ) ) :
  12. // Test if this Post is assigned to the Portfolio category or any descendant and switch the single's template accordingly
  13. include 'single-Portfolio.php';
  14. else : // Continue with normal Loop (Blog category)
  15.  
  16. get_header();
  17.  
  18. $content_position = ( $udesign_options['blog_sidebar'] == 'left' ) ? 'grid_16 push_8' : 'grid_16';
  19. if ( $udesign_options['remove_single_sidebar'] == 'yes' ) $content_position = 'grid_24';?>
  20.  
  21. <div id="content-container" class="container_24">
  22. <div id="main-content" class="<?php echo $content_position; ?>">
  23.  
  24. <div class="main-content-padding">
  25.  
  26. <div id="dados_autor">
  27. <?php the_author();?>
  28. <font color="gray"><h9><?php the_time('d/m/y');?></h9></font>
  29. </div>
  30. <?php echo do_shortcode('[divider]'); ?>
  31.  
  32. <?php if (have_posts()) :
  33. while (have_posts()) : the_post(); ?>
  34. <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
  35. <div class="entry">
  36. <?php // Post Image
  37. if( $udesign_options['display_post_image_in_single_post'] == 'yes' ) display_post_image_fn( $post->ID, false );
  38. the_content(__('<p class="serif">Leia o restante desta entrada &raquo;</p>', 'udesign'));
  39. wp_link_pages(array('before' => '<p><strong>P&aacute;ginas:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
  40. <?php echo do_shortcode('[divider]'); ?>
  41. <div class="postmetadata">
  42.  
  43. <?php echo ( $udesign_options['show_postmetadata_tags'] == 'yes' ) ? the_tags(__('<div>Tags: ', 'udesign'), ', ', '</div>') : ''; ?>
  44. </div>
  45.  
  46. </div>
  47. </div>
  48. <?php comments_template();
  49. endwhile; else: ?>
  50. <p><?php esc_html_e("Desculpe, sem postagens relacionadas a sua busca!", 'udesign'); ?></p>
  51. <?php endif; ?>
  52. </div><!-- end main-content-padding -->
  53. </div><!-- end main-content -->
  54. <?php
  55. if( ( !$udesign_options['remove_single_sidebar'] == 'yes' ) && sidebar_exist('BlogSidebar') ) { get_sidebar('BlogSidebar'); }
  56. ?>
  57. </div><!-- end content-container -->
  58. <?php
  59. endif; // end normal Loop ?>
  60.  
  61. <div class="clear"></div>
  62.  
  63. <?php
  64.  
  65. get_footer();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement