Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.24 KB | None | 0 0
  1. <?php
  2. /**
  3. * The template for displaying content in the single.php template
  4. *
  5. * @package Catch Themes
  6. * @subpackage Catch Box
  7. * @since Catch Box 1.0
  8. */
  9. $recipe_yild = CFS()->get('artabr_recipe_recipeYield');
  10. ?>
  11. <?php if in_category (1) {
  12. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> itemscope itemtype="http://schema.org/Recipe">
  13. <header class="entry-header">
  14. <h1 class="entry-title"><?php the_title(); ?></h1>
  15.  
  16. <?php if ( 'post' == get_post_type() ) : ?>
  17. <div class="entry-meta">
  18. <?php catchbox_posted_on(); ?>
  19. <?php if ( comments_open() && ! post_password_required() ) : ?>
  20. <span class="sep sep-comment"> &mdash; </span>
  21. <span class="comments-link">
  22. <?php comments_popup_link(__('No Comments &darr;', 'catch-box'), __('1 Comment &darr;', 'catch-box'), __('% Comments &darr;', 'catch-box')); ?>
  23. </span>
  24. <?php endif; ?>
  25. </div><!-- .entry-meta -->
  26. <?php endif; ?>
  27. </header><!-- .entry-header -->
  28. <div class="entry-content">
  29.  
  30. <img src="<?php echo CFS()->get('artabr_recipe_resultPhoto'); ?>">
  31. <?php echo CFS()->get( 'artabr_recipe_recipeYield' ); ?>
  32. <span class="recipe"><strong itemprop="recipeYield"><?php echo $recipe_yield; ?></strong></span>
  33. <?php echo CFS()->get( 'artabr_recipe_cookTime' ); ?>
  34.  
  35. <?php echo CFS()->get( 'artabr_recipe_coocingMethod' ); ?>
  36. <?php
  37. $fields_art = CFS()->get('artabr_recipe_ing');
  38. echo '<ul>';
  39. foreach ($fields_art as $field_art) {
  40. echo '<li> '. $field_art['artabr_recipe_ing_name'].''.
  41. $field_art['artabr_recipe_ing_count'].'</li>';
  42. }
  43. echo '</ul>';
  44. ?>
  45. <img src="<?php echo CFS()->get('artabr_recipe_ing_foto'); ?>">
  46. <?php
  47. $fields_rec= CFS()->get('artabr_stepbystep');
  48. foreach ( $fields_rec as $field_rec ) : ?>
  49. <img src="<?php echo $field_rec['artabr_photo_step'];?>">
  50. <div class="photo-step-desc"><?php echo $field_rec['artabr_text_step']; ?></div>
  51. <?php
  52. endforeach;
  53. ?>
  54. </div>
  55.  
  56. <?php the_content(); ?>
  57.        <?php the_content(); ?>
  58. <?php wp_link_pages( array(
  59. 'before' => '<div class="page-link"><span class="pages">' . __( 'Pages:', 'catch-box' ) . '</span>',
  60. 'after' => '</div>',
  61. 'link_before' => '<span>',
  62. 'link_after' => '</span>',
  63. ) );
  64. ?>
  65. </div><!-- .entry-content -->
  66.  
  67. <footer class="entry-meta">
  68. <?php
  69. /* translators: used between list items, there is a space after the comma */
  70. $categories_list = get_the_category_list( __( ', ', 'catch-box' ) );
  71.  
  72. /* translators: used between list items, there is a space after the comma */
  73. $tag_list = get_the_tag_list( '', __( ', ', 'catch-box' ) );
  74. if ( '' != $tag_list ) {
  75. $utility_text = __( 'This entry was posted in %1$s and tagged %2$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'catch-box' );
  76. } elseif ( '' != $categories_list ) {
  77. $utility_text = __( 'This entry was posted in %1$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'catch-box' );
  78. } else {
  79. $utility_text = __( 'This entry was posted by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'catch-box' );
  80. }
  81.  
  82. printf(
  83. $utility_text,
  84. $categories_list,
  85. $tag_list,
  86. esc_url( get_permalink() ),
  87. the_title_attribute( 'echo=0' ),
  88. get_the_author(),
  89. esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) )
  90. );
  91. ?>
  92. <?php edit_post_link( __( 'Edit', 'catch-box' ), '<span class="edit-link">', '</span>' ); ?>
  93.  
  94.  
  95. </footer><!-- .entry-meta -->
  96. </article><!-- #post-<?php the_ID(); ?> -->
  97. <?php } else {
  98. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> itemscope itemtype="http://schema.org/Art">
  99. <header class="entry-header">
  100. <h1 class="entry-title"><?php the_title(); ?></h1>
  101.  
  102. <?php if ( 'post' == get_post_type() ) : ?>
  103. <div class="entry-meta">
  104. <?php catchbox_posted_on(); ?>
  105. <?php if ( comments_open() && ! post_password_required() ) : ?>
  106. <span class="sep sep-comment"> &mdash; </span>
  107. <span class="comments-link">
  108. <?php comments_popup_link(__('No Comments &darr;', 'catch-box'), __('1 Comment &darr;', 'catch-box'), __('% Comments &darr;', 'catch-box')); ?>
  109. </span>
  110. <?php endif; ?>
  111. </div><!-- .entry-meta -->
  112. <?php endif; ?>
  113. </header><!-- .entry-header -->
  114. <div class="entry-content">
  115.  
  116. <img src="<?php echo CFS()->get('artabr_recipe_resultPhoto'); ?>">
  117. <?php echo CFS()->get( 'artabr_recipe_recipeYield' ); ?>
  118. <span class="recipe"><strong itemprop="recipeYield"><?php echo $recipe_yield; ?></strong></span>
  119. <?php echo CFS()->get( 'artabr_recipe_cookTime' ); ?>
  120.  
  121. <?php echo CFS()->get( 'artabr_recipe_coocingMethod' ); ?>
  122. <?php
  123. $fields_art = CFS()->get('artabr_recipe_ing');
  124. echo '<ul>';
  125. foreach ($fields_art as $field_art) {
  126. echo '<li> '. $field_art['artabr_recipe_ing_name'].''.
  127. $field_art['artabr_recipe_ing_count'].'</li>';
  128. }
  129. echo '</ul>';
  130. ?>
  131. <img src="<?php echo CFS()->get('artabr_recipe_ing_foto'); ?>">
  132. <?php
  133. $fields_rec= CFS()->get('artabr_stepbystep');
  134. foreach ( $fields_rec as $field_rec ) : ?>
  135. <img src="<?php echo $field_rec['artabr_photo_step'];?>">
  136. <div class="photo-step-desc"><?php echo $field_rec['artabr_text_step']; ?></div>
  137. <?php
  138. endforeach;
  139. ?>
  140. </div>
  141.  
  142. <?php the_content(); ?>
  143.        <?php the_content(); ?>
  144. <?php wp_link_pages( array(
  145. 'before' => '<div class="page-link"><span class="pages">' . __( 'Pages:', 'catch-box' ) . '</span>',
  146. 'after' => '</div>',
  147. 'link_before' => '<span>',
  148. 'link_after' => '</span>',
  149. ) );
  150. ?>
  151. </div><!-- .entry-content -->
  152.  
  153. <footer class="entry-meta">
  154. <?php
  155. /* translators: used between list items, there is a space after the comma */
  156. $categories_list = get_the_category_list( __( ', ', 'catch-box' ) );
  157.  
  158. /* translators: used between list items, there is a space after the comma */
  159. $tag_list = get_the_tag_list( '', __( ', ', 'catch-box' ) );
  160. if ( '' != $tag_list ) {
  161. $utility_text = __( 'This entry was posted in %1$s and tagged %2$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'catch-box' );
  162. } elseif ( '' != $categories_list ) {
  163. $utility_text = __( 'This entry was posted in %1$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'catch-box' );
  164. } else {
  165. $utility_text = __( 'This entry was posted by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'catch-box' );
  166. }
  167.  
  168. printf(
  169. $utility_text,
  170. $categories_list,
  171. $tag_list,
  172. esc_url( get_permalink() ),
  173. the_title_attribute( 'echo=0' ),
  174. get_the_author(),
  175. esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) )
  176. );
  177. ?>
  178. <?php edit_post_link( __( 'Edit', 'catch-box' ), '<span class="edit-link">', '</span>' ); ?>
  179.  
  180.  
  181. </footer><!-- .entry-meta -->
  182. </article><!-- #post-<?php the_ID(); ?> --> }
  183.  
  184. <?php if ( get_the_author_meta( 'description' ) && ( ! function_exists( 'is_multi_author' ) || is_multi_author() ) ) : // If a user has filled out their description and this is a multi-author blog, show a bio on their entries ?>
  185. <div id="author-info">
  186. <div id="author-avatar">
  187. <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'catchbox_author_bio_avatar_size', 68 ) ); ?>
  188. </div><!-- #author-avatar -->
  189. <div id="author-description">
  190. <h2><?php printf( __( 'About %s', 'catch-box' ), get_the_author() ); ?></h2>
  191. <?php the_author_meta( 'description' ); ?>
  192. <div id="author-link">
  193. <a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
  194. <?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'catch-box' ), get_the_author() ); ?>
  195. </a>
  196. </div><!-- #author-link -->
  197. </div><!-- #author-description -->
  198. </div><!-- #entry-author-info -->
  199. <?php endif;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement