PageRenderTime 55ms CodeModel.GetById 31ms RepoModel.GetById 1ms app.codeStats 0ms

/wp-content/themes/ifeature/content.php

https://github.com/Bochet/festival_lgbt
PHP | 139 lines | 104 code | 20 blank | 15 comment | 22 complexity | d7e7119e97cb4cfa6cdc7de17d047b45 MD5 | raw file
Possible License(s): GPL-2.0, AGPL-1.0, LGPL-2.1
  1. <?php
  2. /**
  3. * Content Template
  4. *
  5. * Please do not edit this file. This file is part of the Cyber Chimps Framework and all modifications
  6. * should be made in a child theme.
  7. *
  8. * @category CyberChimps Framework
  9. * @package Framework
  10. * @since 1.0
  11. * @author CyberChimps
  12. * @license http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later)
  13. * @link http://www.cyberchimps.com/
  14. */
  15. ?>
  16. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  17. <header class="entry-header">
  18. <?php cyberchimps_post_format_icon();
  19. if ( 'page' == get_post_type() ) :
  20. // get the page title toggle option
  21. $page_title = get_post_meta( get_the_ID(), 'cyberchimps_page_title_toggle', true);
  22. if( is_search() ):
  23. ?>
  24. <h2 class='entry-title'>
  25. <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'cyberchimps' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark">
  26. <?php ( get_the_title() )? the_title() : the_permalink(); ?>
  27. </a>
  28. </h2>
  29. <?php
  30. elseif( $page_title == "1" || $page_title == "" ) :
  31. echo "<h2 class='entry-title'>";
  32. ( get_the_title() )? the_title() : the_permalink();
  33. echo "</h2>";
  34. endif;
  35. else :
  36. if( 'post' == get_post_type() && is_single() ) :
  37. // get the post title toggle option
  38. $post_title = cyberchimps_option( 'single_post_title' );
  39. if( $post_title == "1" ) : ?>
  40. <h2 class="entry-title">
  41. <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'cyberchimps' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark">
  42. <?php ( get_the_title() )? the_title() : the_permalink(); ?>
  43. </a>
  44. </h2>
  45. <?php endif;
  46. else : ?>
  47. <h2 class="entry-title">
  48. <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'cyberchimps' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark">
  49. <?php ( get_the_title() )? the_title() : the_permalink(); ?>
  50. </a>
  51. </h2>
  52. <?php
  53. endif;
  54. endif;
  55. if ( 'post' == get_post_type() ) : ?>
  56. <div class="entry-meta">
  57. <?php cyberchimps_posted_on(); ?>
  58. <?php cyberchimps_posted_in() ?>
  59. <?php cyberchimps_post_comments() ?>
  60. </div><!-- .entry-meta -->
  61. <?php endif; ?>
  62. </header><!-- .entry-header -->
  63. <?php if ( is_single() ) : // Only display Excerpts for Search ?>
  64. <div class="entry-content">
  65. <?php cyberchimps_featured_image(); ?>
  66. <?php the_content( __( 'Continue reading', 'cyberchimps' ) . ' <span class="meta-nav">&rarr;</span>' ); ?>
  67. <?php edit_post_link( __( 'Edit', 'cyberchimps' ), '<span class="edit-link">', '</span>' ); ?>
  68. <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'cyberchimps' ), 'after' => '</div>' ) ); ?>
  69. </div><!-- .entry-content -->
  70. <?php elseif( is_archive() ): ?>
  71. <?php if( cyberchimps_get_option( 'archive_post_excerpts', 0 ) ): ?>
  72. <div class="entry-summary">
  73. <?php cyberchimps_featured_image(); ?>
  74. <?php the_excerpt(); ?>
  75. </div>
  76. <?php else: ?>
  77. <div class="entry-content">
  78. <?php cyberchimps_featured_image(); ?>
  79. <?php the_content( __( 'Continue reading', 'cyberchimps' ) . ' <span class="meta-nav">&rarr;</span>' ); ?>
  80. <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'cyberchimps' ), 'after' => '</div>' ) ); ?>
  81. </div><!-- .entry-content -->
  82. <?php endif; ?>
  83. <?php elseif( is_search() ): ?>
  84. <div class="entry-summary">
  85. <?php cyberchimps_featured_image(); ?>
  86. <?php add_filter( 'excerpt_more', 'cyberchimps_search_excerpt_more', 999 ); ?>
  87. <?php add_filter( 'excerpt_length', 'cyberchimps_search_excerpt_length', 999 ); ?>
  88. <?php the_excerpt(); ?>
  89. <?php remove_filter( 'excerpt_length', 'cyberchimps_search_excerpt_length', 999 ); ?>
  90. <?php remove_filter( 'excerpt_more', 'cyberchimps_search_excerpt_more', 999 ); ?>
  91. </div><!-- .entry-summary -->
  92. <?php elseif( is_page() ): ?>
  93. <div class="entry-summary">
  94. <?php cyberchimps_featured_image(); ?>
  95. <?php the_content(); ?>
  96. <?php edit_post_link( __( 'Edit', 'cyberchimps' ), '<span class="edit-link">', '</span>' ); ?>
  97. </div><!-- .entry-summary -->
  98. <?php else :// blog post pages ?>
  99. <?php if( cyberchimps_get_option( 'post_excerpts', 0 ) ): ?>
  100. <div class="entry-summary">
  101. <?php cyberchimps_featured_image(); ?>
  102. <?php the_excerpt(); ?>
  103. <?php edit_post_link( __( 'Edit', 'cyberchimps' ), '<span class="edit-link">', '</span>' ); ?>
  104. </div>
  105. <?php else: ?>
  106. <div class="entry-content">
  107. <?php cyberchimps_featured_image(); ?>
  108. <?php the_content( __( 'Continue reading', 'cyberchimps' ) . ' <span class="meta-nav">&rarr;</span>' ); ?>
  109. <?php edit_post_link( __( 'Edit', 'cyberchimps' ), '<span class="edit-link">', '</span>' ); ?>
  110. <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'cyberchimps' ), 'after' => '</div>' ) ); ?>
  111. </div><!-- .entry-content -->
  112. <?php endif; ?>
  113. <?php endif; ?>
  114. <?php if ( 'post' == get_post_type() && cyberchimps_get_option( 'post_byline_tags', 1 ) ) : // Hide category and tag text for pages on Search ?>
  115. <footer class="entry-meta">
  116. <?php cyberchimps_post_tags(); ?>
  117. </footer><!-- #entry-meta -->
  118. <?php endif; // End if 'post' == get_post_type() ?>
  119. </article><!-- #post-<?php the_ID(); ?> -->