當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。