| Server IP : 54.216.143.184 / Your IP : 172.31.14.113 Web Server : Apache/2.4.68 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/3.0.2 System : Linux ip-172-31-10-208.eu-west-1.compute.internal 6.8.0-1044-aws #46~22.04.1-Ubuntu SMP Tue Dec 2 12:52:18 UTC 2025 x86_64 User : kazang ( 1006) PHP Version : 8.2.31 Disable Function : 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_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,exec,system,passthru,shell_exec,proc_open,popen MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/kazang/web/kazang.com/public_html/wp-content/themes/underboot/template-parts/ |
Upload File : |
<?php
/**
* Template part for displaying head banner in front-page.php
*
* @link https://getbootstrap.com/docs/4.3/components/jumbotron/
* @link https://codex.wordpress.org/Template_Hierarchy
*
*/
$heading = get_theme_mod( 'banner_title' );
$subheading = get_theme_mod( 'banner_subtitle' );
$btn_link = get_theme_mod( 'banner_button_link' );
$btn_label = get_theme_mod( 'banner_button_label' );
$bg_img = get_theme_mod('banner_bg_image');
if( ! empty( $bg_img ) ){
$img_url = wp_get_attachment_url( $bg_img );
}
if( empty( $heading ) && empty( $subheading ) && empty( $bg_img ) && empty( $btn_label ) ) {
return;
}
?>
<section class="jumbotron text-center"<?php if( ! empty( $bg_img ) ){ echo ' style="background: url(' . esc_url( $img_url ) . ');"';} ?>>
<div class="container">
<h1 class="jumbotron-heading<?php if( ! empty( $bg_img ) ){ echo ' text-white';} ?>"><?php echo esc_html( $heading ); ?></h1>
<p class="lead<?php if( ! empty( $bg_img ) ){ echo ' text-white';} ?>"><?php echo esc_html( $subheading ); ?></p>
<?php if( ! empty( $btn_label ) ){ ?>
<p>
<a href="<?php echo esc_url( $btn_link ); ?>" class="btn btn-primary my-2">
<?php echo esc_html( $btn_label ); ?>
</a>
</p>
<?php } ?>
</div>
</section>