Advertisement
artemsemkin

Rhye theme: single.php template

Oct 28th, 2022 (edited)
1,215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.67 KB | None | 0 0
  1. <?php
  2.  
  3. $is_elementor_page = arts_is_built_with_elementor();
  4. $masthead_template = '';
  5. $post_type         = get_post_type();
  6.  
  7. $portfolio_nav_enabled    = get_theme_mod( 'portfolio_nav_enabled', true );
  8. $portfolio_nav_style      = get_theme_mod( 'portfolio_nav_style', 'portfolio-auto-scroll' );
  9. $portfolio_nav_post_types = get_theme_mod( 'portfolio_nav_post_types', array( 'arts_portfolio_item' ) );
  10. $has_bottom_navigation    = $is_elementor_page && $portfolio_nav_enabled && in_array( $post_type, $portfolio_nav_post_types );
  11.  
  12. if ( $is_elementor_page ) {
  13.   $masthead_template = 'elementor-' . arts_get_document_option( 'page_masthead_layout' );
  14. }
  15.  
  16. get_header();
  17.  
  18. /**
  19.  * Page Masthead
  20.  */
  21. get_template_part( 'template-parts/masthead/masthead', esc_attr( $masthead_template ) );
  22. the_post();
  23. ?>
  24.  
  25. <?php if ( ! $is_elementor_page ) : ?>
  26.   <section class="section py-medium section-blog">
  27.     <div class="container">
  28.       <div class="row justify-content-center">
  29.         <div class="col">
  30.           <div class="post">
  31.             <div class="post__content clearfix">
  32.               <?php the_content(); ?>
  33.             </div>
  34.           </div>
  35.         </div>
  36.       </div>
  37.     </div>
  38.   </section>
  39. <?php else : ?>
  40.   <?php the_content(); ?>
  41. <?php endif; ?>
  42.  
  43. <?php if ( comments_open() || get_comments_number() ) : ?>
  44.   <!-- post comments -->
  45.   <div class="post__comments mt-small" data-barba-prevent="all">
  46.     <?php comments_template(); ?>
  47.   </div>
  48.   <!-- - post comments -->
  49. <?php endif; ?>
  50.  
  51. <?php
  52.  
  53. /**
  54.  * Page Bottom Navigation
  55.  */
  56. if ( $has_bottom_navigation ) {
  57.   get_template_part( 'template-parts/nav/nav', esc_attr( $portfolio_nav_style ) );
  58. }
  59.  
  60. get_footer();
  61.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement