HEX
Server: Apache
System: Linux sg2plmcpnl492417.prod.sin2.secureserver.net 4.18.0-553.58.1.lve.el8.x86_64 #1 SMP Fri Jul 4 12:07:06 UTC 2025 x86_64
User: nyiet8349bzl (9207396)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: /home/nyiet8349bzl/public_html/ducoa.org/wp-content/themes/dustrial/single-our_project.php
<?php
/**
 * The template for displaying all single posts.
 *
 * @package dustrial
 */

get_header(); 

do_action('dustrial_breadcrum');

?>

<div class="project-single-page">
    <div class="container">
      <div class="row">
        <?php 
            if ( have_posts() ) : while ( have_posts() ) : the_post();
                $post_thumb = get_the_post_thumbnail_url();

                // Check if the big image option is enabled and set the margin class accordingly
                $dustrial_project_bigimage_enable = dustrial_get_option('dustrial_project_bigimage_enable');
                $pcmargins = $dustrial_project_bigimage_enable ? '' : 'nobigimg';

                // If the big image option is enabled, display the project thumbnail
                if (!empty($dustrial_project_bigimage_enable)) : ?>
                    <div class="col-md-12 single-project-thumbnail">
                        <img src="<?php echo esc_url($post_thumb); ?>" class="img-fluid" alt="<?php esc_attr_e('single page feature image', 'dustrial'); ?>">
                    </div>
                <?php endif; ?>

            <?php endwhile; ?>
        <?php endif; ?>

        <?php
            $dustrial_project_info = get_post_meta(get_the_ID(), '_dustrial_our_project', true);

            // Assign values or default to an empty string
            $project_client   = $dustrial_project_info['project_client'] ?? '';
            $project_location = $dustrial_project_info['project_location'] ?? '';
            $project_date     = $dustrial_project_info['project_date'] ?? '';
            $project_website  = $dustrial_project_info['project_website'] ?? '';
            $project_socials  = $dustrial_project_info['project_socials'] ?? '';
            $dustrial_project_toppart_enable = dustrial_get_option('dustrial_project_toppart_enable');
            $dustrial_project_contact_enable = dustrial_get_option('dustrial_project_contact_enable');

            // Determine column size based on conditions
            $pcols = (!empty($dustrial_project_toppart_enable) || !empty($dustrial_project_contact_enable) || is_active_sidebar('project-widgets')) ? '8' : '12';
        ?>

        <div class="col-lg-4 col-12 order-1 order-lg-0">
            <?php if ( is_active_sidebar( 'project-widgets') ) : ?>
                <div class="market-single-widgets-area project-single-widgets">
                    <?php dynamic_sidebar( 'project-widgets' ); ?>
                </div>
            <?php endif; ?>

            <?php if(!empty($dustrial_project_toppart_enable)) : ?>
                <div class="single_project_widgets <?php echo esc_attr($pcmargins);?>">
                    <ul>
                        <div class="project-details-title">
                            <?php
                            $project_widgets_title = dustrial_get_option('dustrial_project_widget_title');
                            if (!empty($project_widgets_title)) : ?>
                                <h2><?php echo esc_html($project_widgets_title); ?></h2>
                            <?php endif; ?>
                        </div>

                        <?php
                        $dustrial_project_catg_title = dustrial_get_option('dustrial_project_catg_title');
                        if (!empty($dustrial_project_catg_title)) : ?>
                            <li>
                                <span class="font-weight-bold"><?php echo esc_html($dustrial_project_catg_title); ?>:</span>
                                <?php echo get_the_term_list(get_the_ID(), 'our_project_tax', '', ', ', ''); ?>
                            </li>
                        <?php endif; ?>

                        <?php
                        $dustrial_project_clients_title = dustrial_get_option('dustrial_project_clients_title');
                        if (!empty($dustrial_project_clients_title) && !empty($project_client)) : ?>
    	                    <li>
    	                        <span class="font-weight-bold"><?php echo esc_html($dustrial_project_clients_title); ?>:</span>
    	                        <?php echo esc_html( $project_client ); ?>
    	                    </li>
    	                <?php endif; ?>

                        <?php
                        $dustrial_project_locats_title = dustrial_get_option('dustrial_project_locats_title');
    	                if (!empty($dustrial_project_locats_title) && !empty($project_location)) : ?>
    	                    <li>
    	                        <span class="font-weight-bold"><?php echo esc_html($dustrial_project_locats_title); ?>:</span>
    	                        <?php echo esc_html( $project_location ); ?>
    	                    </li>
    	                <?php endif; ?>

    	                <?php
                        $dustrial_project_dates_title = dustrial_get_option('dustrial_project_dates_title');
    	                    if (!empty($dustrial_project_dates_title) && !empty($project_date)) : ?>
    	                    <li>
    	                        <span class="font-weight-bold"><?php echo esc_html($dustrial_project_dates_title); ?>:</span>
    	                        <?php echo esc_html( $project_date ); ?>
    	                    </li>
    	                <?php endif; ?>

                        <?php
                        $dustrial_project_urls_title = dustrial_get_option('dustrial_project_urls_title');
                        if (!empty($dustrial_project_urls_title) && !empty($project_website)) : ?>
                            <li>
                                <span class="font-weight-bold"><?php echo esc_html($dustrial_project_urls_title); ?>:</span>
                                <a href="<?php echo esc_url($project_website); ?>"><?php echo esc_attr($project_website); ?></a>
                            </li>
                        <?php endif; ?>
                    </ul>

                    <?php if (is_array($project_socials)) : ?>
                        <div class="block social-media d-flex">
                            <?php foreach ($project_socials as $value) :
                                if (!empty($value['social_icon']) && !empty($value['social_link'])) : ?>
                                    <a class="<?php echo esc_attr($value['social_icon']); ?> d-flex justify-content-center align-items-center" href="<?php echo esc_url($value['social_link']); ?>"></a>
                                <?php endif; ?>
                            <?php endforeach; ?>
                        </div>
                    <?php endif; ?>
                </div>
            <?php endif; ?>

            <?php if (!empty($dustrial_project_contact_enable)) : ?>
                <div class="single_project_widgets activebgcolor">
                    <ul>
                        <div class="project-details-title">
                            <?php $dustrial_contact_info_title = dustrial_get_option('dustrial_contact_info_title'); ?>
                            <h2><?php echo esc_html($dustrial_contact_info_title);?></h2>
                        </div>

                        <?php $dustrial_contact_info_location = dustrial_get_option('dustrial_contact_info_location'); 
                        if (!empty($dustrial_contact_info_location)) : ?>
                            <li><span><i class="fa fa-map-marker"></i></span>
                                <?php echo esc_html($dustrial_contact_info_location);?>
                            </li>
                        <?php endif; ?>

                        <?php $dustrial_contact_info_number = dustrial_get_option('dustrial_contact_info_number');
                        if (!empty($dustrial_contact_info_number)) : ?>
                            <li><span><i class="fa fa-phone"></i></span>
                                <?php echo esc_html($dustrial_contact_info_number);?>
                            </li>
                        <?php endif; ?>

                        <?php 
                        $dustrial_contact_info_email = dustrial_get_option('dustrial_contact_info_email');
                        if (!empty($dustrial_contact_info_email)) : ?>
                            <li><span><i class="fa fa-envelope"></i></span>
                                <?php echo esc_html($dustrial_contact_info_email);?>
                            </li>
                        <?php endif; ?>
                    </ul>
                </div>
            <?php endif; ?>

        </div>
        <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
            <div class="col-lg-<?php echo esc_attr($pcols);?> col-12 order-0 order-lg-1">
              <div class="project-info <?php echo esc_attr($pcmargins);?>">
                <h1><?php the_title(); ?></h1>
                <?php the_content(); ?>
              </div>
            </div>
        <?php endwhile; ?>

        <?php else : ?>

        <?php get_template_part( 'template-parts/content', 'none' ); ?>

        <?php endif; ?>

      </div> <!-- End Row -->
    </div>
  </div> <!-- End project section -->

<?php get_footer(); ?>