当前位置: 首页>>代码示例>>PHP>>正文


PHP woo_pagination函数代码示例

本文整理汇总了PHP中woo_pagination函数的典型用法代码示例。如果您正苦于以下问题:PHP woo_pagination函数的具体用法?PHP woo_pagination怎么用?PHP woo_pagination使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了woo_pagination函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: woo_pagenav

    function woo_pagenav($custom_query = '')
    {
        global $woo_options, $wp_query, $paged, $page;
        // Set query max pages
        $max_pages = 1;
        if ('' != $custom_query) {
            $max_pages = $custom_query->max_num_pages;
        } else {
            $max_pages = $wp_query->max_num_pages;
        }
        // If the user has set the option to use simple paging links, display those. By default, display the pagination.
        if (@$woo_options['woo_pagination_type'] == 'simple') {
            if (get_next_posts_link('', $max_pages) || get_previous_posts_link()) {
                ?>
            <div class="nav-entries">
                <?php 
                next_posts_link('<span class="nav-prev fl"><i class="icon-angle-left"></i> ' . __('Older posts', 'woothemes') . '</span>', $max_pages);
                ?>
                <?php 
                previous_posts_link('<span class="nav-next fr">' . __('Newer posts', 'woothemes') . ' <i class="icon-angle-right"></i></span>');
                ?>
                <div class="fix"></div>
            </div>
		<?php 
            }
            // End IF Statement
        } else {
            woo_pagination(array(), $custom_query);
        }
        // End IF Statement
    }
开发者ID:klgrimley,项目名称:mzf,代码行数:31,代码来源:theme-functions.php

示例2: woo_pagenav

    function woo_pagenav()
    {
        global $woo_options;
        // If the user has set the option to use simple paging links, display those. By default, display the pagination.
        if (array_key_exists('woo_pagination_type', $woo_options) && $woo_options['woo_pagination_type'] == 'simple') {
            if (get_next_posts_link() || get_previous_posts_link()) {
                ?>

            <div class="nav-entries">
                <?php 
                next_posts_link('<span class="nav-prev fl">' . __('<span class="meta-nav">&larr;</span> Older posts', 'woothemes') . '</span>');
                ?>
                <?php 
                previous_posts_link('<span class="nav-next fr">' . __('Newer posts <span class="meta-nav">&rarr;</span>', 'woothemes') . '</span>');
                ?>
                <div class="fix"></div>
            </div>

		<?php 
            }
            // ENDIF
        } else {
            woo_pagination();
        }
        // ENDIF
    }
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:26,代码来源:theme-functions.php

示例3: woocommerceframework_pagination

 function woocommerceframework_pagination()
 {
     if (is_search() && is_post_type_archive()) {
         add_filter('woo_pagination_args', 'woocommerceframework_add_search_fragment', 10);
         add_filter('woo_pagination_args_defaults', 'woocommerceframework_woo_pagination_defaults', 10);
     }
     woo_pagination();
 }
开发者ID:iplaydu,项目名称:Bob-Ellis-Shoes,代码行数:8,代码来源:theme-woocommerce.php

示例4: woo_projects_pagination

 function woo_projects_pagination()
 {
     if (is_search() && is_post_type_archive()) {
         add_filter('woo_pagination_args', 'woo_projects_add_search_fragment', 10);
         add_filter('woo_pagination_args_defaults', 'woo_projects_pagination_defaults', 10);
     }
     woo_pagination();
 }
开发者ID:danmaby,项目名称:VAT,代码行数:8,代码来源:template.php

示例5: woo_sensei_pagination

 /**
  * Woo Sensei Pagination
  * Replaces the standard Sensei archive pagination with woo_pagination();
  */
 function woo_sensei_pagination()
 {
     global $wp_query, $woothemes_sensei;
     $paged = $wp_query->get('paged');
     $course_page_id = intval($woothemes_sensei->settings->settings['course_page']);
     if ((is_post_type_archive('course') || is_page($course_page_id)) && (isset($paged) && 0 == $paged)) {
         // Silence
     } elseif (is_singular('course')) {
         $woothemes_sensei->frontend->sensei_get_template('wrappers/pagination-posts.php');
     } elseif (is_singular('lesson')) {
         $woothemes_sensei->frontend->sensei_get_template('wrappers/pagination-lesson.php');
     } elseif (is_singular('quiz')) {
         $woothemes_sensei->frontend->sensei_get_template('wrappers/pagination-quiz.php');
     } else {
         woo_pagination();
     }
 }
开发者ID:maesson,项目名称:lyft,代码行数:21,代码来源:template.php

示例6: woo_pagenav

    function woo_pagenav($custom_query = '')
    {
        global $woo_options, $wp_query, $paged, $page;
        if (is_object($custom_query) && is_a($custom_query, 'WP_Query')) {
            $original_query = $wp_query;
            $wp_query = $custom_query;
        }
        // Set query max pages
        $max_pages = 1;
        if (isset($wp_query->max_num_pages)) {
            $max_pages = $wp_query->max_num_pages;
        }
        // Change the icon classes if is_rtl().
        $left_class = 'left';
        $right_class = 'right';
        if (is_rtl()) {
            $left_class = 'right';
            $right_class = 'left';
        }
        // If the user has set the option to use simple paging links, display those. By default, display the pagination.
        if (isset($woo_options['woo_pagination_type']) && 'simple' == $woo_options['woo_pagination_type']) {
            if (get_next_posts_link('', $max_pages) || get_previous_posts_link()) {
                ?>
            <div class="nav-entries">
                <?php 
                next_posts_link('<span class="nav-prev fl"><i class="fa fa-angle-' . esc_attr($left_class) . '"></i> ' . __('Older posts', 'woothemes') . '</span>', $max_pages);
                ?>
                <?php 
                previous_posts_link('<span class="nav-next fr">' . __('Newer posts', 'woothemes') . ' <i class="fa fa-angle-' . esc_attr($right_class) . '"></i></span>');
                ?>
                <div class="fix"></div>
            </div>
		<?php 
            }
            // End IF Statement
            if (is_object($custom_query) && is_a($custom_query, 'WP_Query')) {
                $wp_query = $original_query;
            }
        } else {
            woo_pagination(array(), $custom_query);
        }
        // End IF Statement
    }
开发者ID:plusplusminus,项目名称:athol,代码行数:43,代码来源:theme-functions.php

示例7: woo_pagenav

    function woo_pagenav()
    {
        global $woo_options, $wp_query, $paged, $page;
        // If the user has set the option to use simple paging links, display those. By default, display the pagination.
        if (@$woo_options['woo_pagination_type'] == 'simple') {
            if (get_next_posts_link() || get_previous_posts_link()) {
                ?>
            <div class="nav-entries">
                <?php 
                next_posts_link('<span class="nav-prev icon fl">' . __('Older posts', 'woothemes') . '</span>');
                ?>
                <?php 
                previous_posts_link('<span class="nav-next icon fr">' . __('Newer posts', 'woothemes') . '</span>');
                ?>
                <div class="fix"></div>
            </div>
		<?php 
            }
            // End IF Statement
        } else {
            woo_pagination();
        }
        // End IF Statement
    }
开发者ID:pwillems,项目名称:mimosa-contents,代码行数:24,代码来源:theme-functions.php

示例8: woo_pagenav

    function woo_pagenav()
    {
        // If the user has set the option to use simple paging links, display those. By default, display the pagination.
        if (wootique_get_woo_option('woo_pagination_type') == 'simple') {
            if (get_next_posts_link() || get_previous_posts_link()) {
                ?>
            <div class="nav-entries">
                <?php 
                next_posts_link('<span class="nav-prev fl">' . __('<span class="meta-nav">&larr;</span> Older posts', 'woothemes') . '</span>');
                ?>
                <?php 
                previous_posts_link('<span class="nav-next fr">' . __('Newer posts <span class="meta-nav">&rarr;</span>', 'woothemes') . '</span>');
                ?>
                <div class="fix"></div>
            </div>
		<?php 
            }
        } else {
            woo_pagination();
        }
        // End IF Statement
    }
开发者ID:Recongt,项目名称:www-ecommerce-,代码行数:22,代码来源:theme-functions.php

示例9: woo_pagination

		            
		            <?php 
        if ($counter % 4 == 0) {
            ?>

		            	<div class="fix"></div>
		            <?php 
        }
        ?>

		                                                
		        <?php 
    }
    // End WHILE Loop
    echo '<div class="fix"></div>';
    woo_pagination();
} else {
    ?>

        
		            <div class="post">
		                <p><?php 
    _e('Sorry, no posts matched your criteria.', 'woothemes');
    ?>
</p>
		            </div><!-- /.post -->
		        
		        <?php 
}
// End IF Statement
?>
开发者ID:nuevomediagroup,项目名称:nmg-code,代码行数:30,代码来源:index.php

示例10: woo_listingsnav

    function woo_listingsnav()
    {
        global $woo_options;
        // If the user has set the option to use simple paging links, display those. By default, display the pagination.
        if (array_key_exists('woo_pagination_type', $woo_options) && $woo_options['woo_pagination_type'] == 'simple') {
            if (get_next_posts_link() || get_previous_posts_link()) {
                ?>
		
    	    <div class="nav-entries">
    	    	<?php 
                previous_posts_link('<div class="nav-prev fl">' . __('&laquo; Previous Results ', 'woothemes') . '</div>');
                ?>
    		    <?php 
                next_posts_link('<div class="nav-next fr">' . __(' More Results &raquo;', 'woothemes') . '</div>');
                ?>
    	        <div class="fix"></div>
    	    </div>
		
		<?php 
            }
        } else {
            woo_pagination();
        }
    }
开发者ID:marcus7777,项目名称:eh-theme,代码行数:24,代码来源:theme-functions.php

示例11: _e

</span></a> / <a href="#" class="active" id="grid" title="<?php 
    _e('Grid', '');
    ?>
"><span><?php 
    _e('Grid', '');
    ?>
</span></a>
       <?php 
}
?>
        </nav>
       <?php 
$args = array('prev_next' => true, 'prev_text' => __('<', 'woothemes'), 'next_text' => __('>', 'woothemes'), 'before' => '<div class="pagination woo-pagination">' . __('Page', 'woothemes') . '', 'after' => '</div>');
?>
 <?php 
woo_pagination($args);
?>
    
    </div>
    
    <div class="clear"></div>
    
    <div class="row woo-banner hidden-xs">
 	 <?php 
//if ( ! dynamic_sidebar( 'woo_banner' ) ) :
//endif
?>
       <?php 
if (!is_single()) {
    ?>
       <div class="prodcatimg">
开发者ID:juandanceswild,项目名称:aomp-backup,代码行数:31,代码来源:woocommerce.php


注:本文中的woo_pagination函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。