250,
'width' => 250,
'flex-width' => true,
'flex-height' => true,
)
);
if ( ! function_exists( 'blog_posts_setup' ) ) :
function blog_posts_setup() {
/*
* Make child theme available for translation.
* Translations can be filed in the /languages/ directory.
*/
load_child_theme_textdomain( 'blog-posts', get_stylesheet_directory() . '/languages' );
}
// Set up the WordPress core custom background feature.
add_theme_support(
'custom-background',
apply_filters(
'blog_posts_custom_background_args',
array(
'default-color' => 'f4f3ee',
'default-image' => '',
)
)
);
endif;
add_action( 'after_setup_theme', 'blog_posts_setup' );
if ( ! function_exists( 'blog_posts_enqueue_styles' ) ) :
/**
* Enqueue scripts and styles.
*/
function blog_posts_enqueue_styles() {
$parenthandle = 'glowing-blog-style';
$theme = wp_get_theme();
wp_enqueue_style(
$parenthandle,
get_template_directory_uri() . '/style.css',
array(
'glowing-blog-fonts',
'glowing-blog-slick-style',
'glowing-blog-fontawesome-style',
'glowing-blog-blocks-style',
),
$theme->parent()->get( 'Version' )
);
wp_enqueue_style(
'blog-posts-style',
get_stylesheet_uri(),
array( $parenthandle ),
$theme->get( 'Version' )
);
wp_enqueue_script( 'blog-posts-custom-script', get_stylesheet_directory_uri() . '/assets/js/custom.min.js', array( 'jquery', 'glowing-blog-custom-script' ), $theme->get( 'Version' ), true );
}
endif;
add_action( 'wp_enqueue_scripts', 'blog_posts_enqueue_styles' );
require get_theme_file_path() . '/inc/customizer/customizer.php';
/**
* Adds custom classes to the array of body classes.
*
* @param array $classes Classes for the body element.
* @return array
*/
function blog_posts_body_classes( $classes ) {
// added class for floating header.
$classes[] = 'floating-header';
return $classes;
}
add_filter( 'body_class', 'blog_posts_body_classes' );
/**
* Pagination for archive.
*/
function blog_posts_render_posts_pagination() {
$is_pagination_enabled = get_theme_mod( 'glowing_blog_pagination_enable', true );
if ( $is_pagination_enabled ) {
$pagination_type = get_theme_mod( 'blog_posts_pagination_type', 'numeric' );
if ( 'default' === $pagination_type ) :
the_posts_navigation();
else :
the_posts_pagination();
endif;
}
}
add_action( 'blog_posts_posts_pagination', 'blog_posts_render_posts_pagination', 10 );
function blog_posts_load_custom_wp_admin_style() {
?>