HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux sa-dev.otherchirps.net 5.15.0-139-generic #149-Ubuntu SMP Fri Apr 11 22:06:13 UTC 2025 x86_64
User: www-data (33)
PHP: 8.0.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wp-content/themes/kalium/single-portfolio.php
<?php
/**
 * Kalium WordPress Theme
 *
 * Laborator.co
 * www.laborator.co
 */
if ( ! defined( 'ABSPATH' ) ) {
	exit; // Direct access not allowed.
}

$item_type = kalium_get_field( 'item_type' );

// Custom Item Link Redirect
if ( kalium_get_field( 'item_linking' ) == 'external' ) {
	$launch_link_href = kalium_get_field( 'launch_link_href' );

	if ( $launch_link_href ) {
		if ( $launch_link_href != '#' ) {
			wp_redirect( $launch_link_href, 301 );
		} else {
			// Disabled item links, will redirect to closest next/previous post
			$include_categories = kalium_get_theme_option( 'portfolio_prev_next_category' ) ? true : false;

			$prev = get_next_post( $include_categories, '', 'portfolio_category' );
			$next = get_previous_post( $include_categories, '', 'portfolio_category' );

			if ( ! empty( $next ) ) {
				wp_redirect( get_permalink( $next ) );
			} else if ( ! empty( $prev ) ) {
				wp_redirect( get_permalink( $prev ) );
			}
		}

		die();
	}
}

// Disable Lightbox
if ( kalium_get_theme_option( 'portfolio_disable_lightbox' ) ) {
	kalium()->helpers->add_body_class( 'lightbox-disabled' );
}

// Theme header
get_header();

// Portfolio content
while ( have_posts() ) {
	the_post();

	// Post password.
	if ( post_password_required() ) {
		?>
        <div class="container password-protected-portfolio-item">
            <div class="row">
                <div class="col-sm-12"><?php echo get_the_password_form(); ?></div>
            </div>
        </div>
		<?php
		continue;
	}

	// Portfolio item type layout.
	switch ( $item_type ) {
		case 'type-1':
			get_template_part( 'tpls/portfolio-single-1' );
			break;

		case 'type-2':
			get_template_part( 'tpls/portfolio-single-2' );
			break;

		case 'type-3':
			get_template_part( 'tpls/portfolio-single-3' );
			break;

		case 'type-4':
			get_template_part( 'tpls/portfolio-single-4' );
			break;

		case 'type-5':
			get_template_part( 'tpls/portfolio-single-5' );
			break;

		case 'type-6':
			get_template_part( 'tpls/portfolio-single-6' );
			break;

		case 'type-7':
			get_template_part( 'tpls/portfolio-single-7' );
			break;
	}
}

// Theme footer
get_footer();