is_main_query() && ( is_home() || is_front_page() ) ) {
$sticky_posts = get_option( 'sticky_posts' );
if ( !empty( $sticky_posts ) ) {
$query->set( 'post__not_in', $sticky_posts );
}
}
}
}
endif;
add_action( 'pre_get_posts', 'blogbuster_exclude_sticky_posts_from_index' );
/*------------------------------ Innerpage Single Post -----------------------*/
if ( ! function_exists( 'blogbuster_post_author_box' ) ) :
/**
* Displays the author box section on the single post page.
*
* @since 1.0.0
*/
function blogbuster_post_author_box() {
get_template_part( 'template-parts/partials/post/author', 'box' );
}
endif;
add_action( 'blogbuster_after_single_post_loop_content', 'blogbuster_post_author_box', 10 );
if ( ! function_exists( 'blogbuster_related_posts_section' ) ) :
/**
* Displays the related posts section on the single post page.
*
* @since 1.0.0
*/
function blogbuster_related_posts_section() {
get_template_part( 'template-parts/partials/post/related', 'posts' );
}
endif;
add_action( 'blogbuster_after_single_post_loop_content', 'blogbuster_related_posts_section', 20 );
if ( ! function_exists( 'blogbuster_archive_title_prefix' ) ) :
/**
* Archive title prefix
*
* @since 1.0.0
*/
function blogbuster_archive_title_prefix( $title ) {
$title_prefix_enable = blogbuster_get_customizer_option_value( 'blogbuster_archive_title_prefix_enable' );
if ( false === $title_prefix_enable ) {
return preg_replace( '/^\w+: /', '', $title );
} else {
return $title;
}
}
endif;
add_filter( 'get_the_archive_title', 'blogbuster_archive_title_prefix' );
/*------------------------------ Footer Section ------------------------------*/
if ( ! function_exists( 'blogbuster_scroll_top_section' ) ) :
/**
* Displays the Scroll Top section in the footer.
*
* @since 1.0.0
*/
function blogbuster_scroll_top_section() {
get_template_part( 'template-parts/partials/footer/scroll', 'top' );
}
endif;
add_action( 'blogbuster_after_page', 'blogbuster_scroll_top_section', 10 );
if ( ! function_exists( 'blogbuster_footer_background_animation' ) ) :
/**
* Manage the background animation div.
*
* @since 1.0.0
*/
function blogbuster_footer_background_animation() {
$blogbuster_background_animation_enable = blogbuster_get_customizer_option_value( 'blogbuster_background_animation_enable' );
if ( true !== $blogbuster_background_animation_enable ) {
return;
}
echo '';
}
endif;
add_action( 'blogbuster_after_page', 'blogbuster_footer_background_animation', 20 );