Advertisement
Guest User

content.php

a guest
May 29th, 2015
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.76 KB | None | 0 0
  1. <?php
  2. /**
  3. * The default template for displaying content
  4. *
  5. * @package Catch Themes
  6. * @subpackage Catch_Box
  7. * @since Catch Box 1.0
  8. */
  9. ?>
  10.  
  11. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  12. <header class="entry-header">
  13. <?php if ( is_sticky() ) : ?>
  14. <hgroup>
  15. <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'catchbox' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
  16. <h3 class="entry-format"><?php _e( 'Featured', 'catchbox' ); ?></h3>
  17. </hgroup>
  18. <?php else : ?>
  19. <h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'catchbox' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
  20. <?php endif; ?>
  21.  
  22. <?php if ( 'post' == get_post_type() ) : ?>
  23. <div class="entry-meta">
  24. <?php catchbox_posted_on(); ?>
  25. <?php if ( comments_open() && ! post_password_required() ) : ?>
  26. <span class="sep sep-comment"> &mdash; </span>
  27. <span class="comments-link">
  28. <?php comments_popup_link(__('No Comments &darr;', 'catchbox'), __('1 Comment &darr;', 'catchbox'), __('% Comments &darr;', 'catchbox')); ?>
  29. </span>
  30. <?php endif; ?>
  31. </div><!-- .entry-meta -->
  32. <?php endif; ?>
  33. </header><!-- .entry-header -->
  34.  
  35. <?php
  36. $options = catchbox_get_theme_options();
  37. $current_content_layout = $options['content_layout'];
  38. $catchbox_excerpt = get_the_excerpt();
  39.  
  40. if ( is_search() ) : // Only display Excerpts for Search ?>
  41. <div class="entry-summary">
  42. <?php the_excerpt(); ?>
  43. </div><!-- .entry-summary -->
  44. <?php elseif ( $current_content_layout=='excerpt' && !empty( $catchbox_excerpt ) ) : // Only display Featured Image and Excerpts if checked in Theme Option ?>
  45. <div class="entry-summary">
  46. <?php if( has_post_thumbnail() ):?>
  47. <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'catchbox' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark">
  48. <?php the_post_thumbnail('featured-slider'); ?>
  49. </a>
  50. <?php endif; ?>
  51. <?php the_excerpt(); ?>
  52. </div><!-- .entry-summary -->
  53. <?php else : ?>
  54. <div class="entry-content">
  55. <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'catchbox' ) ); ?>
  56. <?php wp_link_pages( array(
  57. 'before' => '<div class="page-link"><span class="pages">' . __( 'Pages:', 'catchbox' ) . '</span>',
  58. 'after' => '</div>',
  59. 'link_before' => '<span>',
  60. 'link_after' => '</span>',
  61. ) );
  62. ?>
  63. </div><!-- .entry-content -->
  64. <?php endif; ?>
  65.  
  66. <footer class="entry-meta">
  67. <?php $show_sep = false; ?>
  68. <?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?>
  69. <?php
  70. /* translators: used between list items, there is a space after the comma */
  71. $categories_list = get_the_category_list( __( ', ', 'catchbox' ) );
  72. if ( $categories_list ):
  73. ?>
  74. <span class="cat-links">
  75. <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'catchbox' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list );
  76. $show_sep = true; ?>
  77. </span>
  78. <?php endif; // End if categories ?>
  79. <?php
  80. /* translators: used between list items, there is a space after the comma */
  81. $tags_list = get_the_tag_list( '', __( ', ', 'catchbox' ) );
  82. if ( $tags_list ):
  83. if ( $show_sep ) : ?>
  84. <span class="sep"> | </span>
  85. <?php endif; // End if $show_sep ?>
  86. <span class="tag-links">
  87. <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'catchbox' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
  88. $show_sep = true; ?>
  89. </span>
  90. <?php endif; // End if $tags_list ?>
  91. <?php endif; // End if 'post' == get_post_type() ?>
  92.  
  93. <?php if ( comments_open() ) : ?>
  94. <?php if ( $show_sep ) : ?>
  95. <span class="sep"> | </span>
  96. <?php endif; // End if $show_sep ?>
  97. <span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'catchbox' ) . '</span>', __( '<b>1</b> Reply', 'catchbox' ), __( '<b>%</b> Replies', 'catchbox' ) ); ?></span>
  98. <?php endif; // End if comments_open() ?>
  99.  
  100. <?php edit_post_link( __( 'Edit', 'catchbox' ), '<span class="edit-link">', '</span>' ); ?>
  101. </footer><!-- #entry-meta -->
  102. </article><!-- #post-<?php the_ID(); ?> -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement