surferdude, how are you overriding the jumbotron function? Because I’ve been trying to so it with no success. I keep getting errors. Can you share the code from your child theme that is overriding the jumbotron function? Thanks.
Sure…. this is my functions.php within my child theme…
<?php
//Import the Parent Themes Stylesheet :-)
add_action( 'wp_enqueue_scripts', 'enqueue_parent_theme_style' );
function enqueue_parent_theme_style() {
wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
}
/**
* This is where you can copy and paste your functions !
*/
add_filter('tc_credits_display', 'my_custom_credits');
function my_custom_credits(){
$credits = 'All Rights Reserved.';
$newline_credits = '';
return '
<div class="span4 credits">
<p> · © '.esc_attr( date( 'Y' ) ).' <a href="'.esc_url( home_url() ).'" title="'.esc_attr(get_bloginfo()).'" rel="bookmark">'.esc_attr(get_bloginfo()).'</a> · '.($credits ? $credits : 'Designed by <a href="http://www.themesandco.com/">Themes & Co</a>').' ·'.($newline_credits ? '<br />· '.$newline_credits.' ·' : '').'</p> </div>';
}
/**
* Create the jumbo headline section on the home page
*
* @since 1.0.0
*/
function bavotasan_jumbotron() {
$bavotasan_theme_options = bavotasan_theme_options();
if ( ! empty( $bavotasan_theme_options['jumbo_headline_title'] ) ) {
?>
<?php if ( is_front_page() || is_home() ){?>
<?php if ( is_active_sidebar( 'jumbotron_sidebar_1' ) ) { ?>
<div id="jumbotron-sidebar" class="custom-jumbotron visible-md-* visible-lg-* hidden-xs" role="complementary">
<?php dynamic_sidebar( 'jumbotron_sidebar_1' ); ?>
</div><!-- #jumbotron-sidebar -->
<?php } else {?>
<div class="home-top">
<div class="container">
<div class="row">
<div class="home-jumbotron jumbotron col-lg-10 col-lg-offset-1 col-sm-12 test">
<h1><?php echo $bavotasan_theme_options['jumbo_headline_title']; ?></h1>
<p class="lead"><?php echo $bavotasan_theme_options['jumbo_headline_text']; ?></p>
<?php if ( ! empty( $bavotasan_theme_options['jumbo_headline_button_text'] ) ) { ?>
<a class="btn btn-lg btn-primary" href="<?php echo $bavotasan_theme_options['jumbo_headline_button_link']; ?>"><?php echo $bavotasan_theme_options['jumbo_headline_button_text']; ?></a>
<?php } ?>
<i class="middle-circle icon-off"></i>
</div>
</div>
</div>
</div>
<?php } ?>
<?php
}
}
}
/**
* Register our widgets
*
*/
function extra_widgets_init() {
register_sidebar( array(
'name' => 'Header Left',
'id' => 'header_left_sidebar_1',
'before_widget' => '<div class="header-widget header-left">',
'after_widget' => '</div>',
'before_title' => '',
'after_title' => '',
) );
register_sidebar( array(
'name' => 'Header Right',
'id' => 'header_right_sidebar_1',
'before_widget' => '<div class="header-widget header-right">',
'after_widget' => '</div>',
'before_title' => '',
'after_title' => '',
) );
register_sidebar( array(
'name' => 'Custom Jumbotron',
'id' => 'jumbotron_sidebar_1',
'before_widget' => '<div class="custom-jumbotron-outer">',
'after_widget' => '</div>',
'before_title' => '',
'after_title' => '',
) );
}
add_action( 'widgets_init', 'extra_widgets_init' );
?>
You have to unfortunately add the code to the parent theme as shown above in my original post too otherwise WordPress on Linux complains with an error and WordPress on windows just shows a blank page.
My only real change to the Jumbotron IIRC was to make it visible on the homepage only. I’d have preferred to add options to the Theme Customizer for that but alas my skills aren’t there to do that yet.
I’ve left the rest of my changes in the code too, on the offchance they are useful. I hope this helps.