= 1 && intval( $columns ) <= 5 ) ? intval( $columns ) : 3; $column = 1; // Set clearfix to avoid error if there are no boxes $clearfix = 1; // Set user defined style for content boxes $userstyle = $style; // Create a custom WP Query $page_ids = array(); foreach ( $boxes as $key => $box ) { $box['page'] = ( isset( $box['page'] ) ) ? intval( $box['page'] ) : ''; if ( !empty( $box['page'] ) ) $page_ids[] = $box['page']; } if ( empty( $page_ids ) ) return; // If $page_ids is empty, custom query below will return all posts $query_args = array( 'post_type' => 'page', 'post__in' => $page_ids, 'posts_per_page' => -1, 'orderby' => 'post__in' ); $query_args = apply_filters( 'hootubix_content_blocks_query', $query_args, $instance, $before_title, $title, $after_title ); $content_blocks_query = new WP_Query( $query_args ); // Temporarily remove read more links from excerpts hootubix_remove_readmore_link(); // Template modification Hook do_action( 'hootubix_content_blocks_wrap', 'pages', $content_blocks_query, $page_ids ); ?>