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() ) : ?>