'footer',
'container' => 'div',
'container_id' => 'footer-navigation',
'depth' => 1,
'fallback_cb' => false,
) );
?>
ID, 'best_business_settings', true );
if ( isset( $post_options['post_layout'] ) && ! empty( $post_options['post_layout'] ) ) {
$global_layout = $post_options['post_layout'];
}
}
// Include primary sidebar.
if ( 'no-sidebar' !== $global_layout ) {
get_sidebar();
}
// Include secondary sidebar.
switch ( $global_layout ) {
case 'three-columns':
get_sidebar( 'secondary' );
break;
default:
break;
}
}
endif;
add_action( 'best_business_action_sidebar', 'best_business_add_sidebar' );
if ( ! function_exists( 'best_business_custom_posts_navigation' ) ) :
/**
* Posts navigation.
*
* @since 1.0.0
*/
function best_business_custom_posts_navigation() {
the_posts_pagination();
}
endif;
add_action( 'best_business_action_posts_navigation', 'best_business_custom_posts_navigation' );
if ( ! function_exists( 'best_business_add_image_in_single_display' ) ) :
/**
* Add image in single template.
*
* @since 1.0.0
*/
function best_business_add_image_in_single_display() {
if ( has_post_thumbnail() ) {
$args = array(
'class' => 'best-business-post-thumb aligncenter',
);
the_post_thumbnail( 'large', $args );
}
}
endif;
add_action( 'best_business_single_image', 'best_business_add_image_in_single_display' );
if ( ! function_exists( 'best_business_add_custom_header' ) ) :
/**
* Add custom header.
*
* @since 1.0.0
*/
function best_business_add_custom_header() {
if ( ( is_front_page() && ! is_home() ) ) {
return;
}
?>
';
if ( is_home() ) {
echo esc_html( best_business_get_option( 'blog_page_title' ) );
} elseif ( is_singular() ) {
echo single_post_title( '', false );
} elseif ( is_archive() ) {
the_archive_title();
} elseif ( is_search() ) {
printf( esc_html__( 'Search Results for: %s', 'best-business' ), get_search_query() );
} elseif ( is_404() ) {
esc_html_e( '404 Error', 'best-business' );
}
echo '';
}
endif;
add_action( 'best_business_action_custom_header_title', 'best_business_add_title_in_custom_header' );
if ( ! function_exists( 'best_business_add_breadcrumb' ) ) :
/**
* Add breadcrumb.
*
* @since 1.0.0
*/
function best_business_add_breadcrumb() {
// Bail if home page.
if ( is_front_page() || is_home() ) {
return;
}
echo'';
best_business_breadcrumb();
echo '
';
}
endif;
add_action( 'best_business_add_breadcrumb', 'best_business_add_breadcrumb', 10 );
if ( ! function_exists( 'best_business_footer_goto_top' ) ) :
/**
* Go to top.
*
* @since 1.0.0
*/
function best_business_footer_goto_top() {
echo '';
}
endif;
add_action( 'best_business_action_after', 'best_business_footer_goto_top', 20 );
if ( ! function_exists( 'best_business_add_front_page_widget_area' ) ) :
/**
* Add front page widget area.
*
* @since 1.0.0
*/
function best_business_add_front_page_widget_area() {
if ( is_front_page() && ! is_home() && is_active_sidebar( 'sidebar-front-page-widget-area' ) ) {
echo '';
}
}
endif;
add_action( 'best_business_action_before_content', 'best_business_add_front_page_widget_area', 7 );
if ( ! function_exists( 'best_business_add_footer_widgets' ) ) :
/**
* Add footer widgets.
*
* @since 1.0.0
*/
function best_business_add_footer_widgets() {
get_template_part( 'template-parts/footer-widgets' );
}
endif;
add_action( 'best_business_action_before_footer', 'best_business_add_footer_widgets', 5 );
if ( ! function_exists( 'best_business_add_top_head_content' ) ) :
/**
* Add top head section.
*
* @since 1.0.0
*/
function best_business_add_top_head_content() {
$contact_number = best_business_get_option( 'contact_number' );
$contact_email = best_business_get_option( 'contact_email' );
$show_social_in_header = best_business_get_option( 'show_social_in_header' );
if ( empty( $contact_number ) && empty( $contact_email ) ) {
$contact_status = false;
} else {
$contact_status = true;
}
if ( false === has_nav_menu( 'top' ) && ( false === best_business_get_option( 'show_social_in_header' ) || false === has_nav_menu( 'social' ) ) ) {
return;
}
?>