blog ) ) return; if ( empty( $hoot_theme->blog['args'] ) || !is_array( $hoot_theme->blog['args'] ) ) $hoot_theme->blog['args'] = array(); /* Create Query */ $query_args = wp_parse_args( $hoot_theme->blog['args'] , array( 'ignore_sticky_posts' => 1, ) ); $query_args = apply_filters( 'hoot_blog_widget_query_args', $query_args ); $hoot_blog_widget_query = new WP_Query( $query_args ); /* Add Pagination */ if ( !function_exists( 'hoot_blog_widget_pagination' ) ) : function hoot_blog_widget_pagination( $hoot_blog_widget_query, $query_args ) { $base_url = ( !empty( $query_args['cat'] ) ) ? get_category_link( $query_args['cat'] ) : get_permalink( get_option( 'page_for_posts' ) ); hoot_loop_pagination( array(), $hoot_blog_widget_query, $base_url ); } endif; add_action( 'hoot_blog_widget_content_end', 'hoot_blog_widget_pagination', 10, 2 ); if ( isset( $hoot_theme->blog['pagination'] ) && $hoot_theme->blog['pagination'] === false ) remove_action( 'hoot_blog_widget_content_end', 'hoot_blog_widget_pagination', 10, 2 ); /* Set current layout */ $sidebar = hoot_get_mod( 'sidebar_archives', false ); $sidebar = ( !$sidebar ) ? hoot_get_mod( 'sidebar', false ) : $sidebar; hoot_set_current_layout( $sidebar ); /* Display List */ if ( $hoot_blog_widget_query->have_posts() ) : ?>
blog['title'] ) ) echo '

' . $hoot_theme->blog['title'] . '

'; ?>
have_posts() ): $hoot_blog_widget_query->the_post(); $archive_type = apply_filters( 'hoot_default_archive_type', 'big', 'blog-widget' ); $archive_template = apply_filters( 'hoot_default_archive_location', 'template-parts/content-archive', $archive_type, 'blog-widget' ); // Loads the template-parts/content-archive-{type}.php template. get_template_part( $archive_template, $archive_type ); endwhile; ?>