';
echo '
';
wp_list_pages( array(
'title_li' => '',
'depth' => 1,
'number' => 5,
) );
echo '';
}
endif;
//=============================================================
// Alter body class function
//=============================================================
function blog_way_body_classes( $classes ) {
// Adds a class of group-blog to blogs with more than 1 published author.
if ( is_multi_author() ) {
$classes[] = 'group-blog';
}
// Adds a class of hfeed to non-singular pages.
if ( ! is_singular() ) {
$classes[] = 'hfeed';
}
$sticky = blog_way_get_option( 'sticky' );
if( 1 != $sticky ){
$classes[] = 'sticky-top';
}
return $classes;
}
add_filter( 'body_class', 'blog_way_body_classes' );
//=============================================================
// Pingback function
//=============================================================
function blog_way_pingback_header() {
if ( is_singular() && pings_open() ) {
echo '';
}
}
add_action( 'wp_head', 'blog_way_pingback_header' );
//=============================================================
// Sidebar assigning hook of the theme
//=============================================================
if ( ! function_exists( 'blog_way_sidebar_action' ) ) :
/**
* Add sidebar.
*
* @since 1.0.0
*/
function blog_way_sidebar_action() {
$global_layout = blog_way_get_option( 'global_layout' );
$global_layout = apply_filters( 'blog_way_filter_theme_global_layout', $global_layout );
// Include sidebar.
if ( 'no-sidebar' !== $global_layout ) {
get_sidebar();
}
}
endif;
add_action( 'blog_way_sidebar', 'blog_way_sidebar_action' );