Server : LiteSpeed
System : Linux terra.hostitbro.com 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64
User : outerorb ( 1091)
PHP Version : 8.1.34
Disable Function : mail
Directory :  /home2/outerorb/public_html/inc/

📁 Create New:
⬆️ Upload File:
Current Dir [ Writable ] Root [ Writable ]


OR Upload from URL:
URL: Save as:

📄 File: breadcrumb-banner.php

Path: /home2/outerorb/public_html/inc/breadcrumb-banner.php

Size: 3.95 KB

Permissions: 0666

<?php
/**
 * Reusable Breadcrumb/Hero Banner Section
 * 
 * Usage:
 * $banner_config = [
 *     'title' => 'Page Title',
 *     'subtitle' => 'Subtitle', (optional)
 *     'description' => 'Description text', (optional)
 *     'background_image' => 'banner.jpg', (optional, for full-height style)
 *     'bg_color' => '#5D666F', (optional, default: #5D666F for full-height)
 *     'height' => '350px', (optional, for full-height style, default: 350px)
 *     'style' => 'full-height' or 'with-shapes' (default: 'full-height')
 *     'center' => true/false (optional, default: false)
 * ];
 * include 'inc/breadcrumb-banner.php';
 */

// Default configuration
$banner_config = isset($banner_config) ? $banner_config : [];

$title = isset($banner_config['title']) ? $banner_config['title'] : 'Page Title';
$subtitle = isset($banner_config['subtitle']) ? $banner_config['subtitle'] : '';
$description = isset($banner_config['description']) ? $banner_config['description'] : '';
$background_image = isset($banner_config['background_image']) ? $banner_config['background_image'] : '';
$bg_color = isset($banner_config['bg_color']) ? $banner_config['bg_color'] : '#5D666F';
$height = isset($banner_config['height']) ? $banner_config['height'] : '350px';
$style = isset($banner_config['style']) ? $banner_config['style'] : 'full-height';
$center = isset($banner_config['center']) ? $banner_config['center'] : false;

// Build style string for full-height style
$breadcrumb_style = '';
if ($style === 'full-height' && $background_image) {
    $banner_path = (strpos($background_image, '/') !== false || preg_match('/\.(png|jpe?g|webp|gif|svg)$/i', $background_image))
        ? 'assets/images/' . ltrim($background_image, '/')
        : 'assets/images/banner/' . $background_image;
    $breadcrumb_style = "height: {$height} !important; background-color: {$bg_color} !important; background-image: url('" . (isset($base_url) ? $base_url : '') . $banner_path . "') !important; background-size: cover !important; background-position: center center !important; background-attachment: scroll !important; background-repeat: no-repeat !important; display: flex !important; align-items: center !important; justify-content: center !important;";
}
?>

<!-- rts breadcrumb area start -->
<div class="rts-breadcrumb-area<?php if ($style === 'with-shapes') echo ' small-h'; ?>"<?php if ($breadcrumb_style) echo " style=\"{$breadcrumb_style}\""; ?>>
    <div class="container">
        <div class="row">
            <div class="col-lg-12">
                <div class="title-area-left<?php if ($center) echo ' center'; ?>">
                    <?php if ($subtitle): ?>
                        <span class="<?php if ($style === 'full-height') echo 'bg-title'; else echo 'pre'; ?>"<?php if ($style === 'full-height') echo " style=\"color: #ffffff !important;\""; ?>><?php echo $subtitle; ?></span>
                    <?php endif; ?>
                    <h1 class="title rts-text-anime-style-1"<?php if ($style === 'full-height') echo " style=\"color: #ffffff !important;\""; ?>>
                        <?php echo $title; ?>
                    </h1>
                    <?php if ($description): ?>
                        <p class="disc"<?php if ($style === 'full-height') echo " style=\"color: rgba(255,255,255,0.85) !important;\""; elseif ($style === 'with-shapes') echo " style=\"max-width: 45%;\""; ?>>
                            <?php echo $description; ?>
                        </p>
                    <?php endif; ?>
                </div>
            </div>
        </div>
    </div>
    <?php if ($style === 'with-shapes'): ?>
        <div class="shape-area">
            <img src="assets/images/about/shape/01.png" alt="shape" class="one">
            <img src="assets/images/about/shape/02.png" alt="shape" class="two">
            <img src="assets/images/about/shape/03.png" alt="shape" class="three">
        </div>
    <?php endif; ?>
</div>
<!-- rts breadcrumb area end -->

← Back to Directory Edit File 🔒 Chmod

WP File Manager