Beispiel #1
2
/** Add support for Genesis Grid Loop **/
function child_grid_loop_helper()
{
    if (function_exists('genesis_grid_loop')) {
        remove_action('genesis_before_post_content', 'generate_post_image', 5);
        genesis_grid_loop(array('features' => 2, 'feature_image_size' => 'featured', 'feature_image_class' => 'alignleft post-image', 'feature_content_limit' => 0, 'grid_image_size' => 'grid', 'grid_image_class' => 'alignleft post-image', 'grid_content_limit' => 0, 'more' => __('Continue reading...', 'genesis'), 'posts_per_page' => 6));
    } else {
        genesis_standard_loop();
    }
}
Beispiel #2
1
 /**
  * Do The Loop via the type configured
  *
  * @since 1.0.0
  *
  * @uses genesis_custom_loop()
  * @uses genesis_grid_loop()
  * @uses genesis_standard_loop()
  *
  * @return null
  */
 public function do_loop()
 {
     if ('genesis_custom_loop' == $this->query_config['function']) {
         genesis_custom_loop($this->query_config['query_args']);
     } elseif ('genesis_grid_loop' == $this->query_config['function']) {
         genesis_grid_loop($this->query_config['query_args']);
     } else {
         genesis_standard_loop();
     }
 }
Beispiel #3
0
function minimum_grid_loop_helper()
{
    if (function_exists('genesis_grid_loop')) {
        genesis_grid_loop(array('features' => 0, 'feature_image_size' => 0, 'feature_content_limit' => 0, 'grid_image_size' => 0, 'grid_content_limit' => 250, 'more' => __('[Read more]', 'minimum')));
    } else {
        genesis_standard_loop();
    }
}
Beispiel #4
0
/** Add support for Genesis Grid Loop */
function eleven40_grid_loop_helper()
{
    if (function_exists('genesis_grid_loop')) {
        genesis_grid_loop(array('features' => 1, 'feature_image_size' => 0, 'feature_image_class' => 'alignleft post-image', 'feature_content_limit' => 0, 'grid_image_size' => 'grid-thumbnail', 'grid_image_class' => 'alignnone', 'grid_content_limit' => 250, 'more' => __('[Continue reading]', 'genesis'), 'posts_per_page' => 5));
    } else {
        genesis_standard_loop();
    }
}
Beispiel #5
0
/** Add support for Genesis Grid Loop **/
function child_grid_loop_helper()
{
    if (function_exists('genesis_grid_loop')) {
        genesis_grid_loop(array('features' => 1, 'feature_image_size' => 0, 'feature_image_class' => 'align none post-image', 'feature_content_limit' => 0, 'grid_image_size' => 'grid', 'grid_image_class' => 'align none post-image', 'grid_content_limit' => 0, 'more' => __('Continue reading...', 'genesis'), 'posts_per_page' => 5));
    } else {
        genesis_standard_loop();
    }
}
/** Add support for Genesis Grid Loop **/
function gg_grid_loop_helper()
{
    global $paged;
    $feat_post_info = genesis_get_custom_field('_gg_grid_features_post_info');
    $feat_post_meta = genesis_get_custom_field('_gg_grid_features_post_meta');
    $grid_post_info = genesis_get_custom_field('_gg_grid_post_info');
    $grid_post_meta = genesis_get_custom_field('_gg_grid_post_meta');
    $grid_post_title = genesis_get_custom_field('_gg_grid_post_title');
    if (function_exists('genesis_grid_loop')) {
        $grid_terms = array();
        //set featured grid_args from metaboxes/globals
        $feat_terms = genesis_get_custom_field('_gg_grid_features_term');
        $grid_terms = gg_get_custom_field('_gg_grid_terms_checkbox');
        $feat_tax_query = gg_build_tax_query(array($feat_terms));
        $grid_tax_query = gg_build_tax_query($grid_terms);
        $feat_post_types = genesis_get_custom_field('_gg_grid_features_post_types');
        $grid_post_types = genesis_get_custom_field('_gg_grid_post_types');
        if ($feat_tax_query != $grid_tax_query || $feat_post_types != $grid_post_types) {
            // if features cat/term differs from grid cat/terms, create 2 $grid_args
            $grid_args_featured = array('features' => genesis_get_custom_field('_gg_grid_features'), 'feature_image_size' => genesis_get_custom_field('_gg_grid_feature_image_size'), 'feature_image_class' => genesis_get_custom_field('_gg_grid_feature_image_class'), 'feature_content_limit' => genesis_get_custom_field('_gg_grid_feature_content_limit'), 'grid_image_size' => 0, 'grid_image_class' => '', 'grid_content_limit' => 0, 'more' => genesis_get_custom_field('_gg_grid_read_more'), 'posts_per_page' => genesis_get_custom_field('_gg_grid_features'), 'post_type' => $feat_post_types, 'tax_query' => $feat_tax_query, 'paged' => 0);
            $grid_args_rest = array('features' => 0, 'feature_image_size' => 0, 'feature_image_class' => '', 'feature_content_limit' => 0, 'grid_image_size' => genesis_get_custom_field('_gg_grid_image_size'), 'grid_image_class' => genesis_get_custom_field('_gg_grid_image_class'), 'grid_content_limit' => genesis_get_custom_field('_gg_grid_content_limit'), 'tax_query' => $grid_tax_query, 'post_type' => $grid_post_types, 'more' => genesis_get_custom_field('_gg_grid_read_more'), 'posts_per_page' => genesis_get_custom_field('_gg_grid_posts_per_page'), 'paged' => $paged);
            gg_post_remove($feat_post_info, $feat_post_meta);
            //assuming that features won't go beyond 1 page
            if ($grid_args_featured['paged'] > 1 || $grid_args_rest['paged'] > 1) {
                gg_post_remove($grid_post_info, $grid_post_meta, $grid_post_title);
                genesis_grid_loop($grid_args_rest);
                //do not show featured after page 1
            } else {
                genesis_grid_loop($grid_args_featured);
                gg_post_remove($grid_post_info, $grid_post_meta, $grid_post_title);
                genesis_grid_loop($grid_args_rest);
            }
        } else {
            gg_post_remove($feat_post_info, $feat_post_meta);
            $grid_args = array('features' => genesis_get_custom_field('_gg_grid_features'), 'feature_image_size' => genesis_get_custom_field('_gg_grid_feature_image_size'), 'feature_image_class' => genesis_get_custom_field('_gg_grid_feature_image_class'), 'feature_content_limit' => genesis_get_custom_field('_gg_grid_feature_content_limit'), 'grid_image_size' => genesis_get_custom_field('_gg_grid_image_size'), 'grid_image_class' => genesis_get_custom_field('_gg_grid_image_class'), 'grid_content_limit' => genesis_get_custom_field('_gg_grid_content_limit'), 'more' => genesis_get_custom_field('_gg_grid_read_more'), 'posts_per_page' => genesis_get_custom_field('_gg_grid_posts_per_page'), 'post_type' => genesis_get_custom_field('_gg_grid_features_post_types'), 'tax_query' => $feat_tax_query, 'paged' => $paged);
            genesis_grid_loop($grid_args);
        }
    } else {
        genesis_standard_loop();
    }
}
Beispiel #7
0
function femme_grid_loop()
{
    if (function_exists('genesis_grid_loop')) {
        genesis_grid_loop(array('features' => 1, 'feature_image_size' => 'large', 'feature_image_class' => 'cuttz-alignnone post-image', 'feature_content_limit' => 200, 'grid_image_size' => 'femme-grid-thumbnail', 'grid_image_class' => 'post-image', 'grid_content_limit' => 'no_content', 'more' => __('Continue reading', 'cuttz-framework')));
    } else {
        genesis_standard_loop();
    }
}
/** Add support for Genesis Grid Loop */
function pretty_grid_loop_helper()
{
    genesis_grid_loop(array('features' => 2, 'feature_image_size' => 'feature', 'feature_image_class' => 'post-image', 'feature_content_limit' => 300, 'grid_image_size' => 'grid-thumbnail', 'grid_image_class' => 'alignleft post-image', 'grid_content_limit' => 150, 'more' => __('[Continue reading]', 'genesis'), 'posts_per_page' => 6));
}