'footer',
'container' => 'div',
'container_id' => 'footer-navigation',
'depth' => 1,
'fallback_cb' => false,
) );
?>
ID, 'corporate_key_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( 'corporate_key_action_sidebar', 'corporate_key_add_sidebar' );
if ( ! function_exists( 'corporate_key_custom_posts_navigation' ) ) :
/**
* Posts navigation.
*
* @since 1.0.0
*/
function corporate_key_custom_posts_navigation() {
$pagination_type = corporate_key_get_option( 'pagination_type' );
switch ( $pagination_type ) {
case 'default':
the_posts_navigation();
break;
case 'numeric':
the_posts_pagination();
break;
default:
break;
}
}
endif;
add_action( 'corporate_key_action_posts_navigation', 'corporate_key_custom_posts_navigation' );
if ( ! function_exists( 'corporate_key_add_image_in_single_display' ) ) :
/**
* Add image in single template.
*
* @since 1.0.0
*/
function corporate_key_add_image_in_single_display() {
if ( has_post_thumbnail() ) {
$args = array(
'class' => 'corporate-key-post-thumb aligncenter',
);
the_post_thumbnail( 'large', $args );
}
}
endif;
add_action( 'corporate_key_single_image', 'corporate_key_add_image_in_single_display' );
if ( ! function_exists( 'corporate_key_add_custom_header' ) ) :
/**
* Add custom header.
*
* @since 1.0.0
*/
function corporate_key_add_custom_header() {
if ( ( is_front_page() && ! is_home() ) ) {
return;
}
?>
';
if ( is_home() ) {
echo esc_html( corporate_key_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', 'corporate-key' ), get_search_query() );
} elseif ( is_404() ) {
esc_html_e( '404 Error', 'corporate-key' );
}
echo '';
}
endif;
add_action( 'corporate_key_action_custom_header_title', 'corporate_key_add_title_in_custom_header' );
if ( ! function_exists( 'corporate_key_add_breadcrumb' ) ) :
/**
* Add breadcrumb.
*
* @since 1.0.0
*/
function corporate_key_add_breadcrumb() {
// Bail if home page.
if ( is_front_page() || is_home() ) {
return;
}
echo '';
corporate_key_breadcrumb();
echo '
';
return;
}
endif;
add_action( 'corporate_key_action_breadcrumb', 'corporate_key_add_breadcrumb' );
if ( ! function_exists( 'corporate_key_footer_goto_top' ) ) :
/**
* Go to top.
*
* @since 1.0.0
*/
function corporate_key_footer_goto_top() {
echo '';
}
endif;
add_action( 'corporate_key_action_after', 'corporate_key_footer_goto_top', 20 );
if ( ! function_exists( 'corporate_key_add_front_page_widget_area' ) ) :
/**
* Add front page widget area.
*
* @since 1.0.0
*/
function corporate_key_add_front_page_widget_area() {
if ( is_front_page() && ! is_home() ) {
if ( is_active_sidebar( 'sidebar-front-page-widget-area' ) ) {
echo '';
}
else {
if ( current_user_can( 'edit_theme_options' ) ) {
echo '';
}
}
}
}
endif;
add_action( 'corporate_key_action_before_content', 'corporate_key_add_front_page_widget_area', 7 );
if ( ! function_exists( 'corporate_key_add_footer_widgets' ) ) :
/**
* Add footer widgets.
*
* @since 1.0.0
*/
function corporate_key_add_footer_widgets() {
get_template_part( 'template-parts/footer-widgets' );
}
endif;
add_action( 'corporate_key_action_before_footer', 'corporate_key_add_footer_widgets', 5 );