Ejemplo n.º 1
0
						<?php 
    printf(_n('%d result found matching the keyword <strong>"%s"</strong>.', '%d results found matching the keyword <strong>"%s"</strong>.', $wp_query->found_posts, 'franz-josef'), $wp_query->found_posts, get_search_query());
    ?>
                        </p>
                    </div>
                    
                    <div class="entries-wrapper">
                    <?php 
    while (have_posts()) {
        the_post();
        get_template_part('loop', 'search');
    }
    ?>
                    </div>
                    <?php 
    franz_posts_nav(array('base' => add_query_arg('paged', '%#%'), 'format' => '?paged=%#%'));
    ?>
				<?php 
} else {
    ?>
                    <div class="alert alert-warning">
                    	<p><?php 
    printf(__('No result found matching the keyword <strong>"%s"</strong>. Try a different keyword?', 'franz-josef'), get_search_query());
    ?>
</p>
                    </div>
                    <?php 
    get_search_form();
    ?>
                <?php 
}
Ejemplo n.º 2
0
 /**
  * Comments pagination
  */
 function franz_comments_nav($args = array())
 {
     if (!get_option('page_comments')) {
         return;
     }
     $defaults = apply_filters('franz_comments_nav_defaults', array('current' => max(1, get_query_var('cpage')), 'total' => get_comment_pages_count(), 'base' => add_query_arg('cpage', '%#%'), 'format' => '', 'add_fragment' => '#comments', 'prev_text' => __('&laquo; Prev', 'franz-josef'), 'next_text' => __('Next &raquo;', 'franz-josef'), 'type' => 'comment'));
     $args = wp_parse_args($args, $defaults);
     franz_posts_nav($args);
 }
Ejemplo n.º 3
0
                <?php 
}
?>
                
                <div class="entries-wrapper">
                <?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        franz_get_template_part('loop');
    }
}
?>
                </div>
                <?php 
franz_posts_nav();
?>
                <?php 
do_action('franz_home_bottom');
?>
            </div>
            
            <?php 
get_sidebar();
?>
            
        </div>
    </div>

<?php 
get_footer();
Ejemplo n.º 4
0
    /**
     * Stack: Posts
     */
    function franz_stack_posts($args = array())
    {
        global $franz_settings, $franz_no_default_thumb;
        $franz_no_default_thumb = true;
        if ('page' == get_option('show_on_front') && $franz_settings['disable_front_page_blog']) {
            return;
        }
        $defaults = array('title' => __('Latest Articles', 'franz-josef'), 'description' => '', 'post_type' => array('post'), 'posts_per_page' => get_option('posts_per_page'), 'orderby' => 'date', 'order' => 'DESC', 'ignore_sticky_posts' => false);
        $args = wp_parse_args($args, $defaults);
        $query_args = array('post_type' => $args['post_type'], 'posts_per_page' => $args['posts_per_page'], 'orderby' => $args['orderby'], 'order' => $args['order'], 'ignore_sticky_posts' => $args['ignore_sticky_posts'], 'paged' => get_query_var('paged'));
        if (get_option('show_on_front') == 'page') {
            $query_args['ignore_sticky_posts'] = true;
            $query_args['paged'] = get_query_var('page');
        }
        if ($franz_settings['slider_type'] == 'categories' && $franz_settings['slider_exclude_categories'] != 'disabled') {
            $query_args['category__not_in'] = franz_object_id($franz_settings['slider_specific_categories'], 'category');
        }
        if ($franz_settings['frontpage_posts_cats']) {
            $query_args['category__in'] = franz_object_id($franz_settings['frontpage_posts_cats'], 'category');
        }
        $posts = new WP_Query($query_args);
        ?>
	<div class="posts-list highlights" id="posts-stack">
        <div class="container">
            <h2 class="highlight-title"><?php 
        echo $args['title'];
        ?>
</h2>
            <?php 
        echo wpautop($args['description']);
        ?>
            <div class="row items-container">
            	<?php 
        while ($posts->have_posts()) {
            $posts->the_post();
            if ($posts->current_post == 0 && !$franz_settings['disable_full_width_post']) {
                $col = 'col-md-12';
                $image_size = 'full';
            } elseif ($franz_settings['front_page_blog_columns'] == 2) {
                $col = 'col-sm-6';
                $image_size = 'franz-medium';
            } elseif ($franz_settings['front_page_blog_columns'] == 3) {
                $col = 'col-sm-4';
                $image_size = 'franz-medium';
            } elseif ($franz_settings['front_page_blog_columns'] == 4) {
                $col = 'col-md-3 col-sm-6';
                $image_size = 'medium';
            }
            ?>
                    <div class="item-wrap <?php 
            echo $col;
            ?>
" id="item-<?php 
            the_ID();
            ?>
">
                        <div <?php 
            post_class('item');
            ?>
>
                        	<?php 
            if (has_post_thumbnail()) {
                ?>
                            	<a href="<?php 
                the_permalink();
                ?>
"><?php 
                the_post_thumbnail($image_size);
                ?>
</a>
                            <?php 
            }
            ?>
                            <h3 class="item-title"><a href="<?php 
            the_permalink();
            ?>
"><?php 
            the_title();
            ?>
</a></h3>
                            <div class="excerpt"><?php 
            the_excerpt();
            ?>
</div>
                            <?php 
            franz_stack_posts_meta();
            ?>
                        </div>
                    </div>
                <?php 
        }
        wp_reset_postdata();
        ?>
                
            </div>
            
            <?php 
        $args = apply_filters('franz_posts_stack_nav_args', array('current' => max(1, $posts->query['paged']), 'total' => $posts->max_num_pages, 'add_fragment' => '#posts-stack'), $posts);
        franz_posts_nav($args);
        ?>
            
        </div>
    </div>
    <?php 
    }