PageRenderTime 51ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/wp-content/themes/twentyeleven_child/content.php

https://github.com/Bochet/festival_lgbt
PHP | 150 lines | 114 code | 27 blank | 9 comment | 22 complexity | 3d60f69634fa76b8c7684d16fd5ca0af MD5 | raw file
Possible License(s): GPL-2.0, AGPL-1.0, LGPL-2.1
  1. <?php
  2. /**
  3. * The default template for displaying content
  4. *
  5. * @package WordPress
  6. * @subpackage Twenty_Eleven
  7. * @since Twenty Eleven 1.0
  8. */
  9. ?>
  10. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  11. <header class="entry-header">
  12. <?php if ( is_sticky() ) : ?>
  13. <hgroup>
  14. <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
  15. <h3 class="entry-format"><?php _e( 'Featured', 'twentyeleven' ); ?></h3>
  16. </hgroup>
  17. <?php else : ?>
  18. <h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
  19. <?php endif; ?>
  20. <?php if ( 'post' == get_post_type() ) : ?>
  21. <div class="entry-meta">
  22. <?php twentyeleven_posted_on(); ?>
  23. </div><!-- .entry-meta -->
  24. <?php endif; ?>
  25. <?php if ( comments_open() && ! post_password_required() ) : ?>
  26. <div class="comments-link">
  27. <?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?>
  28. </div>
  29. <?php endif; ?>
  30. </header><!-- .entry-header -->
  31. <?php if ( is_search() ) : // Only display Excerpts for Search ?>
  32. <div class="entry-summary">
  33. <?php the_excerpt(); ?>
  34. </div><!-- .entry-summary -->
  35. <?php else : ?>
  36. <div class="entry-content">
  37. <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
  38. <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
  39. </div><!-- .entry-content -->
  40. <div class="champs-persos">
  41. <?php
  42. $realisateur = get_post_meta($post->ID, 'realisateur', true);
  43. $acteurs = get_post_meta($post->ID, 'acteurs', true);
  44. $annee = get_post_meta($post->ID, 'annee', true);
  45. $pays = get_post_meta($post->ID, 'pays', true);
  46. $pays = get_post_meta($post->ID, 'prix', true);
  47. $pays = get_post_meta($post->ID, 'duree', true);
  48. $pays = get_post_meta($post->ID, 'langue', true);
  49. ?>
  50. <?php if(false === empty($realisateur)): ?>
  51. <span class="champs-persos-item">
  52. <i class=champs-persos-label>réalisateur(s) : </i>
  53. <?php echo $realisateur ?></span></br>
  54. <?php endif; ?>
  55. <?php if(false === empty($acteurs)): ?>
  56. <span class="champs-persos-item">
  57. <i class=champs-persos-label>interprètes : </i>
  58. <?php echo $acteurs ?></span></br>
  59. <?php endif; ?>
  60. <?php if(false === empty($annee)): ?>
  61. <span class="champs-persos-item">
  62. <i class=champs-persos-label>année : </i>
  63. <?php echo $annee ?></span></br>
  64. <?php endif; ?>
  65. <?php if(false === empty($pays)): ?>
  66. <span class="champs-persos-item">
  67. <i class=champs-persos-label>Pays : </i>
  68. <?php echo $pays ?></span></br>
  69. <?php endif; ?>
  70. <?php if(false === empty($prix)): ?>
  71. <span class="champs-persos-item">
  72. <i class=champs-persos-label>prix : </i>
  73. <?php echo $prix ?></span></br>
  74. <?php endif; ?>
  75. <?php if(false === empty($duree)): ?>
  76. <span class="champs-persos-item">
  77. <i class=champs-persos-label>durée : </i>
  78. <?php echo $duree ?></span></br>
  79. <?php endif; ?>
  80. <?php if(false === empty($langue)): ?>
  81. <span class="champs-persos-item">
  82. <i class=champs-persos-label>langue : </i>
  83. <?php echo $langue ?></span></br>
  84. <?php endif; ?>
  85. </div> <!-- .champs-perso -->
  86. <?php endif; ?>
  87. <footer class="entry-meta">
  88. <?php $show_sep = false; ?>
  89. <?php if ( is_object_in_taxonomy( get_post_type(), 'category' ) ) : // Hide category text when not supported ?>
  90. <?php
  91. /* translators: used between list items, there is a space after the comma */
  92. $categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
  93. if ( $categories_list ):
  94. ?>
  95. <span class="cat-links">
  96. <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list );
  97. $show_sep = true; ?>
  98. </span>
  99. <?php endif; // End if categories ?>
  100. <?php endif; // End if is_object_in_taxonomy( get_post_type(), 'category' ) ?>
  101. <?php if ( is_object_in_taxonomy( get_post_type(), 'post_tag' ) ) : // Hide tag text when not supported ?>
  102. <?php
  103. /* translators: used between list items, there is a space after the comma */
  104. $tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
  105. if ( $tags_list ):
  106. if ( $show_sep ) : ?>
  107. <span class="sep"> | </span>
  108. <?php endif; // End if $show_sep ?>
  109. <span class="tag-links">
  110. <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
  111. $show_sep = true; ?>
  112. </span>
  113. <?php endif; // End if $tags_list ?>
  114. <?php endif; // End if is_object_in_taxonomy( get_post_type(), 'post_tag' ) ?>
  115. <?php if ( comments_open() ) : ?>
  116. <?php if ( $show_sep ) : ?>
  117. <span class="sep"> | </span>
  118. <?php endif; // End if $show_sep ?>
  119. <span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span>
  120. <?php endif; // End if comments_open() ?>
  121. <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
  122. </footer><!-- .entry-meta -->
  123. </article><!-- #post-<?php the_ID(); ?> -->