HEX
Server: LiteSpeed
System: Linux srv271.doctorhoster.com 4.18.0-553.141.2.lve.el8.x86_64 #1 SMP Wed Jul 8 16:10:02 UTC 2026 x86_64
User: lcipakco (2751)
PHP: 8.3.32
Disabled: show_source, system, shell_exec, passthru, exec, popen, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, escapeshellcmd, apache_child_terminate, virtual, mb_send_mail, mail, eval, phpinfo
Upload Files
File: /mnt/home/lcipakco/public_html/wp-content/themes/convis/template-parts/page-title.php
<?php
/**
 * Template part for displaying page Title
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package Convis
 */

use ConvisTheme\Classes\Convis_Breadcrumb;
use ConvisTheme\Classes\Convis_Helper;
use ConvisTheme\Classes\Convis_Helper as Helper;
use ConvisTheme\Classes\Convis_Post_Helper;

if ( is_404() ) {
	return;
}

$active_title = Helper::get_option( 'site_page_title', 'enabled' );
$breadcrumb   = Helper::get_option( 'site_breadcrumb', 'enabled' );
$title        = '';
$custom_title = '';
$title_output = [];

if ( is_page() && ! is_home() ) {
	$page_title        = Helper::get_meta( 'convis_page_meta', 'page_title', 'default' );
	$page_breadcrumb   = Helper::get_meta( 'convis_page_meta', 'page_breadcrumb', 'default' );
	$page_title_type   = Helper::get_meta( 'convis_page_meta', 'page_title_type', 'default' );
	$page_custom_title = Helper::get_meta( 'convis_page_meta', 'page_custom_title', '' );

	if ( 'default' !== $page_title ) {
		$active_title = $page_title;
	}

	if ( 'custom' === $page_title_type && ! empty( $page_custom_title ) ) {
		$custom_title = $page_custom_title;
	}

	if ( 'default' !== $page_breadcrumb ) {
		$breadcrumb = $page_breadcrumb;
	}

} elseif ( is_single() && 'post' === get_post_type() ) {
	$post_page_title   = Helper::get_meta( 'convis_post_meta', 'post_page_title', 'default' );
	$post_breadcrumb   = Helper::get_meta( 'convis_post_meta', 'post_breadcrumb', 'default' );
	$post_title_type   = Helper::get_meta( 'convis_post_meta', 'post_title_type', 'default' );
	$post_custom_title = Helper::get_meta( 'convis_post_meta', 'post_custom_title', __( 'News Details', 'convis' ) );

	if ( 'default' !== $post_page_title ) {
		$active_title = $post_page_title;
	}

	if ( 'custom' === $post_title_type && ! empty( $post_custom_title ) ) {
		$custom_title = $post_custom_title;
	}

	if ( 'default' !== $post_breadcrumb ) {
		$breadcrumb = $post_breadcrumb;
	}
} elseif ( is_single() && 'convis_portfolio' === get_post_type() ) {
	$portfolio_page_title   = Helper::get_meta( 'convis_portfolio_meta', 'portfolio_page_title', 'default' );
	$portfolio_breadcrumb   = Helper::get_meta( 'convis_portfolio_meta', 'portfolio_breadcrumb', 'default' );
	$portfolio_title_type   = Helper::get_meta( 'convis_portfolio_meta', 'portfolio_page_title_type', 'default' );
	$portfolio_custom_title = Helper::get_meta( 'convis_portfolio_meta', 'portfolio_custom_title', __( 'Project Details', 'convis' ) );

	if ( 'default' !== $portfolio_page_title ) {
		$active_title = $portfolio_page_title;
	}

	if ( 'custom' === $portfolio_title_type && ! empty( $portfolio_custom_title ) ) {
		$custom_title = $portfolio_custom_title;
	}

	if ( 'default' !== $portfolio_breadcrumb ) {
		$breadcrumb = $portfolio_breadcrumb;
	}
} elseif ( is_single() && 'product' === get_post_type() ) {
	$product_page_title   = Helper::get_meta( 'convis_product_meta', 'product_page_title', 'default' );
	$product_breadcrumb   = Helper::get_meta( 'convis_product_meta', 'product_breadcrumb', 'default' );
	$product_title_type   = Helper::get_meta( 'convis_product_meta', 'product_page_title_type', 'default' );
	$product_custom_title = Helper::get_meta( 'convis_product_meta', 'product_custom_title', '' );

	if ( 'default' !== $product_page_title ) {
		$active_title = $product_page_title;
	}

	if ( 'custom' === $product_title_type && ! empty( $product_custom_title ) ) {
		$custom_title = $product_custom_title;
	}

	if ( 'default' !== $product_breadcrumb ) {
		$breadcrumb = $product_breadcrumb;
	}
}

if ( is_home() ) {
	$title = Helper::get_option( 'blog_archive_title', __( 'Latest News', 'convis' ) );
} elseif ( is_search() ) {
	$title = esc_html__( 'Search Results for: ', 'convis' ) . get_search_query();
} elseif ( is_archive() ) {
	if ( class_exists( 'WooCommerce' ) && is_shop() ) {
		$shop_id = get_option( 'woocommerce_shop_page_id', '' );
		$title   = get_the_title( $shop_id );
	} elseif ( is_post_type_archive( 'convis_portfolio' ) ) {
		$portfolio_title = Convis_Helper::get_option( 'archive_page_title', __( 'Our Portfolio', 'convis' ) );

		if ( 'convis_portfolio' == get_post_type() && ! empty( $portfolio_title ) ) {
			$title = $portfolio_title;
		}
	} else {
		$title = strip_tags( get_the_archive_title() );
	}
} elseif ( ! empty( $custom_title ) ) {
	$title = esc_html( $custom_title );
} else {
	$title = wp_kses_post( get_the_title() );
}

if ( $title ) {
	$title_output[] = $title;
}

if ( 'enabled' !== $active_title ) {
	return;
}

$show_post_meta = Helper::get_option( 'blog_details_meta', 'yes' );

$wrapper_class = 'page-title-wrapper';

if ( is_singular( 'post' ) ) {
	$wrapper_class = 'page-title-wrapper post-details-page';
}

?>

<div class="<?php echo esc_attr( $wrapper_class ) ?>">
    <div class="container">
        <div class="page-content-wrap">
            <h1 class="page-title">
				<?php echo implode( '', $title_output ); ?>
            </h1>
			<?php if ( is_singular( 'post' ) && 'yes' === $show_post_meta ) {
				Convis_Post_Helper::single_post_meta( get_the_ID() );
			} ?>
			<?php if ( 'disabled' !== $breadcrumb && ! is_singular( 'post' ) ) {
				Convis_Breadcrumb::breadcrumb_init();
			} ?>
        </div>
    </div>
</div>