Created
September 14, 2021 03:57
-
-
Save Pavracer/397f51fbad68d9d7c74dea8921ca55ec to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
get_header(); | |
$is_page_builder_used = et_pb_is_pagebuilder_used( get_the_ID() ); | |
$show_navigation = get_post_meta( get_the_ID(), '_et_pb_project_nav', true ); | |
?> | |
<div id="main-content"> | |
<?php if ( ! $is_page_builder_used ) : ?> | |
<div class="container"> | |
<div id="content-area" class="clearfix"> | |
<div id="inner-container"> | |
<?php endif; ?> | |
<?php while ( have_posts() ) : the_post(); ?> | |
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> | |
<?php if ( ! $is_page_builder_used ) : ?> | |
<!-- gallery shortcode field ACF --> | |
<div> <?php if ( get_field('gallery_shortcode') ) { | |
echo do_shortcode( get_field('gallery_shortcode') ); | |
} ?> </div> | |
<!-- end gallery --> | |
<!-- start title --> | |
<div class="content-container"> | |
<div class="et_main_title"> | |
<div class="header-categories"> | |
<span class="et_project_categories"><?php echo get_the_term_list( get_the_ID(), 'project_category', '', ', ' ); ?></span> | |
</div> | |
<div> | |
<h1 class="entry-title"><?php the_title(); ?></h1> | |
</div> | |
<div class="buttonDiv"> | |
<?php if(has_term( 'residential', 'project_category' ) ){ | |
?> | |
<div class="backButton"> | |
<a href="/residential">Back to residential</a> | |
</div> | |
<?php } ?> | |
</div> | |
<div class="buttonDiv"> | |
<?php if(has_term( 'commercial', 'project_category' ) ){ | |
?> | |
<div class="backButton"> | |
<a href="/commercial">Back to commercial</a> | |
</div> | |
<?php } ?> | |
</div> | |
<div class="buttonDiv"> | |
<?php if(has_term( 'nature-play', 'project_category' ) ){ | |
?> | |
<div class="backButton"> | |
<a href="/nature-play">Back to nature play</a> | |
</div> | |
<?php } ?> | |
</div> | |
</div> | |
<!-- end title --> | |
<!-- start body --> | |
<div class="entry-content"> | |
<div class="intro-paragraph"> | |
<?php the_field( 'intro_paragraph' ); ?> | |
</div> | |
<div> | |
<?php the_content(); ?> | |
</div> | |
</div> | |
</div> | |
<!-- end body --> | |
<?php endif; ?> | |
</article> | |
<?php endwhile; ?> | |
<?php if ( ! $is_page_builder_used ) : ?> | |
</div> | |
<?php | |
if ( in_array( $page_layout, array( 'et_full_width_page', 'et_no_sidebar' ) ) ) { | |
et_pb_portfolio_meta_box(); | |
} | |
?> | |
</div> | |
</div> | |
<?php endif; ?> | |
</div> | |
<?php | |
get_footer(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment