fbpx
wp_link_pages( array( 'before' => '', 'link_before' => '', 'link_after' => '', ) ); if( $cur_pt == 'project' ) { if ( !empty($pt_meta['specs_used_patterns'][0]) ) { echo '
' . __('Project patterns', 'polygood') . '
'; $used_patterns = get_post_meta($post_id, 'specs_used_patterns', true); $loop = new WP_Query( array( 'post_type' => 'patterns', 'post_status' => 'publish', 'post__in' => $used_patterns, 'orderby' => 'post__in' ) ); if ( $loop->have_posts() ) { echo '
'; while ( $loop->have_posts() ) { $loop->the_post(); get_template_part( 'template-parts/content', 'patterns' ); } wp_reset_postdata(); echo '
'; } } echo '
'; $similar_type = get_post_meta($post_id, 'similar_list_type', true); $related_projects = array(); if ( $similar_type == 'custom' ) { $similar_list = get_post_meta($post_id, 'similar_list', true); $args = array( 'post_type' => 'project', 'post_status' => 'publish', 'posts_per_page' => $similar_list ? -1 : 4, 'orderby' => $similar_list ? 'post__in' : 'rand' ); if ($similar_list) { $args['post__in'] = $similar_list; } $related_projects = new WP_Query($args); } else { $related_projects = polygood_related_posts($post_id); } if ( $related_projects->have_posts() ) { echo '
' . __('Similar projects', 'polygood') . '
'; while ( $related_projects->have_posts() ) { $related_projects->the_post(); get_template_part( 'template-parts/content', 'project' ); } wp_reset_postdata(); echo '
'; } $contacts_page = get_option('page_for_contacts', false); if ($contacts_page) { echo '

' . __('Have a Project in Mind?', 'polygood') . '

' . __('Let's talk!', 'polygood') . '

'; } } ?>