本文整理汇总了PHP中mfn_pagination函数的典型用法代码示例。如果您正苦于以下问题:PHP mfn_pagination函数的具体用法?PHP mfn_pagination怎么用?PHP mfn_pagination使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了mfn_pagination函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: implode
<div class="column one column_blog">
<div class="blog_wrapper isotope_wrapper">
<div class="posts_group lm_wrapper <?php
echo implode(' ', $blog_classes);
?>
">
<?php
echo mfn_content_post(false, false, $load_more);
?>
</div>
<?php
// pagination
if (function_exists('mfn_pagination')) {
echo mfn_pagination(false, $load_more);
} else {
?>
<div class="nav-next"><?php
next_posts_link(__('← Older Entries', 'betheme'));
?>
</div>
<div class="nav-previous"><?php
previous_posts_link(__('Newer Entries →', 'betheme'));
?>
</div>
<?php
}
?>
</div>
示例2: get_query_var
<?php
$paged = get_query_var('paged') ? get_query_var('paged') : (get_query_var('page') ? get_query_var('page') : 1);
$portfolio_args = array('post_type' => 'portfolio', 'posts_per_page' => mfn_opts_get('portfolio-posts', 6), 'paged' => $paged, 'order' => mfn_opts_get('portfolio-order', 'DESC'), 'orderby' => mfn_opts_get('portfolio-orderby', 'date'), 'ignore_sticky_posts' => 1);
// demo
if ($_GET && key_exists('mfn-iso', $_GET)) {
$portfolio_args['posts_per_page'] = -1;
}
if ($_GET && key_exists('mfn-p', $_GET) && $_GET['mfn-p'] == 'list') {
$portfolio_args['posts_per_page'] = 5;
}
$portfolio_query = new WP_Query($portfolio_args);
echo '<ul class="portfolio_group isotope ' . $portfolio_classes . '">';
echo mfn_content_portfolio($portfolio_query);
echo '</ul>';
echo mfn_pagination($portfolio_query);
wp_reset_query();
?>
</div>
</div>
</div>
</div>
</div>
<!-- .four-columns - sidebar -->
<?php
get_sidebar();
?>
示例3: sc_portfolio
function sc_portfolio($attr, $content = null)
{
extract(shortcode_atts(array('count' => 2, 'category' => '', 'category_multi' => '', 'orderby' => 'date', 'order' => 'DESC', 'style' => 'list', 'columns' => 3, 'greyscale' => '', 'filters' => '', 'pagination' => '', 'load_more' => '', 'related' => ''), $attr));
$translate['all'] = mfn_opts_get('translate') ? mfn_opts_get('translate-item-all', 'All') : __('All', 'betheme');
// class
$class = '';
if ($greyscale) {
$class .= ' greyscale';
}
$paged = get_query_var('paged') ? get_query_var('paged') : (get_query_var('page') ? get_query_var('page') : 1);
$args = array('post_type' => 'portfolio', 'posts_per_page' => intval($count), 'paged' => $paged, 'orderby' => $orderby, 'order' => $order, 'ignore_sticky_posts' => 1);
// categories
if ($category_multi) {
$args['portfolio-types'] = trim($category_multi);
} elseif ($category) {
$args['portfolio-types'] = $category;
}
// related | exclude current
if ($related) {
$args['post__not_in'] = array(get_the_ID());
}
$query_portfolio = new WP_Query($args);
$output = '<div class="column_filters">';
// Echo | Filters
if ($filters && !$category && !$category_multi) {
$output .= '<div id="Filters" class="isotope-filters filters4portfolio" data-parent="column_filters">';
$output .= '<div class="filters_wrapper">';
$output .= '<ul class="categories">';
$output .= '<li class="reset current-cat"><a class="all" data-rel="*" href="#">' . $translate['all'] . '</a></li>';
if ($portfolio_categories = get_terms('portfolio-types')) {
foreach ($portfolio_categories as $category) {
$output .= '<li class="' . $category->slug . '"><a data-rel=".category-' . $category->slug . '" href="' . get_term_link($category) . '">' . $category->name . '</a></li>';
}
}
$output .= '</ul>';
$output .= '</div>';
$output .= '</div>' . "\n";
}
// Echo | Main Content
$output .= '<div class="portfolio_wrapper isotope_wrapper ' . $class . '">';
$output .= '<ul class="portfolio_group lm_wrapper isotope col-' . $columns . ' ' . $style . '">';
$output .= mfn_content_portfolio($query_portfolio, $style);
$output .= '</ul>';
if ($pagination) {
$output .= mfn_pagination($query_portfolio, $load_more);
}
$output .= '</div>' . "\n";
$output .= '</div>' . "\n";
wp_reset_postdata();
return $output;
}
示例4: while
<div id="Content">
<div class="container">
<!-- .content -->
<?php
if ($sidebar) {
echo '<div class="content">';
}
echo '<div class="the_content the_content_wrapper">';
while (have_posts()) {
the_post();
get_template_part('includes/content', get_post_type());
}
// pagination
if (function_exists('mfn_pagination')) {
mfn_pagination();
} else {
?>
<div class="nav-next"><?php
next_posts_link(__('← Older Entries', 'pindol'));
?>
</div>
<div class="nav-previous"><?php
previous_posts_link(__('Newer Entries →', 'pindol'));
?>
</div>
<?php
}
echo '</div>';
if ($sidebar) {
echo '</div>';
示例5: array
$portfolio_args = array('post_type' => 'portfolio', 'posts_per_page' => mfn_opts_get('portfolio-posts', 6), 'paged' => $paged, 'order' => mfn_opts_get('portfolio-order', 'DESC'), 'orderby' => mfn_opts_get('portfolio-orderby', 'date'), 'ignore_sticky_posts' => 1);
// demo
if ($_GET && key_exists('mfn-iso', $_GET)) {
$portfolio_args['posts_per_page'] = -1;
}
if ($_GET && key_exists('mfn-p', $_GET) && $_GET['mfn-p'] == 'list') {
$portfolio_args['posts_per_page'] = 5;
}
if ($_GET && key_exists('mfn-pc', $_GET)) {
$portfolio_args['posts_per_page'] = $_GET['mfn-pc'];
}
$portfolio_query = new WP_Query($portfolio_args);
echo '<ul class="portfolio_group lm_wrapper isotope ' . $portfolio_classes . '">';
echo mfn_content_portfolio($portfolio_query);
echo '</ul>';
echo mfn_pagination($portfolio_query, $load_more);
wp_reset_query();
?>
</div>
</div>
</div>
</div>
</div>
<!-- .four-columns - sidebar -->
<?php
get_sidebar();
?>
示例6: sc_portfolio
function sc_portfolio($attr, $content = null)
{
extract(shortcode_atts(array('count' => '2', 'category' => '', 'category_multi' => '', 'orderby' => 'date', 'order' => 'DESC', 'style' => 'list', 'greyscale' => '', 'pagination' => '', 'load_more' => ''), $attr));
// class
$class = '';
if ($greyscale) {
$class .= ' greyscale';
}
$paged = get_query_var('paged') ? get_query_var('paged') : (get_query_var('page') ? get_query_var('page') : 1);
$args = array('post_type' => 'portfolio', 'posts_per_page' => intval($count), 'paged' => $paged, 'orderby' => $orderby, 'order' => $order, 'ignore_sticky_posts' => 1);
// categories
if ($category_multi) {
$args['portfolio-types'] = trim($category_multi);
} elseif ($category) {
$args['portfolio-types'] = $category;
}
$query_portfolio = new WP_Query($args);
$output = '<div class="portfolio_wrapper isotope_wrapper ' . $class . '">';
$output .= '<ul class="portfolio_group lm_wrapper isotope ' . $style . '">';
$output .= mfn_content_portfolio($query_portfolio, $style);
$output .= '</ul>';
if ($pagination) {
$output .= mfn_pagination($query_portfolio, $load_more);
}
$output .= '</div>' . "\n";
wp_reset_postdata();
return $output;
}
示例7: implode
}
?>
<div class="posts_group <?php
echo implode(' ', $blog_classes);
?>
">
<?php
echo mfn_content_post();
?>
</div>
<?php
// pagination
if (function_exists('mfn_pagination')) {
echo mfn_pagination();
} else {
?>
<div class="nav-next"><?php
next_posts_link(__('← Older Entries', 'betheme'));
?>
</div>
<div class="nav-previous"><?php
previous_posts_link(__('Newer Entries →', 'betheme'));
?>
</div>
<?php
}
?>
</div>