Esempio n. 1
1
function gallery_nav_below()
{
    if (!is_single()) {
        ?>

			<div id="nav-below" class="navigation">
                <?php 
        if (function_exists('wp_pagenavi')) {
            ?>
                <?php 
            wp_pagenavi();
            ?>
                <?php 
        } else {
            ?>
  
				<div class="nav-previous"><?php 
            next_posts_link(__('<span class="meta-nav">&laquo;</span> Older posts', 'thematic'));
            ?>
</div>
				<div class="nav-next"><?php 
            previous_posts_link(__('Newer posts <span class="meta-nav">&raquo;</span>', 'thematic'));
            ?>
</div>
				<?php 
        }
        ?>
			</div>	
	
<?php 
    }
}
Esempio n. 2
0
function getpagenavi()
{
    ?>
    <div id="navigation" class="clearfix">
        <?php 
    if (function_exists('wp_pagenavi')) {
        ?>
            <?php 
        wp_pagenavi();
        ?>
        <?php 
    } else {
        ?>
            <div class="alignleft"><?php 
        next_posts_link(__('&laquo; Older Entries', 'web2feeel'));
        ?>
</div>
            <div class="alignright"><?php 
        previous_posts_link(__('Newer Entries &raquo;', 'web2feel'));
        ?>
</div>
            <div class="clear"></div>
        <?php 
    }
    ?>

    </div>

    <?php 
}
    function nice_pagenavi()
    {
        if (function_exists('wp_pagenavi')) {
            wp_pagenavi();
        } else {
            ?>

			<?php 
            if (get_next_posts_link() || get_previous_posts_link()) {
                ?>

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

			<?php 
            }
            ?>

		<?php 
        }
    }
/**
 * Common page navigation
 */
function webonary_zeedisplay_page_navigation()
{
    if (function_exists('wp_pagenavi')) {
        // if PageNavi is activated
        ?>
		<div class="more_posts">
			<?php 
        wp_pagenavi();
        // Use PageNavi
        ?>
		</div>
	<?php 
    } else {
        // Otherwise, use traditional Navigation
        ?>
		<div class="more_posts">
			<span class="post_links">
				<?php 
        previous_posts_link(__('&laquo; Previous Entries', ZEE_LANG));
        ?>
				<?php 
        next_posts_link(__('Next Entries &raquo;', ZEE_LANG)) & nbsp;
        ?>
			</span>
		</div>
	<?php 
    }
}
function agency_navigation($type = 'plain', $endsize = 1, $midsize = 1)
{
    echo '  <div class="paging clearfix">' . "\n";
    if (function_exists('wp_pagenavi')) {
        ?>

    <?php 
        wp_pagenavi();
        ?>

  <?php 
    } else {
        global $wp_query, $wp_rewrite;
        $wp_query->query_vars['paged'] > 1 ? $current = $wp_query->query_vars['paged'] : ($current = 1);
        // Sanitize input argument values
        if (!in_array($type, array('plain', 'list', 'array'))) {
            $type = 'plain';
        }
        $endsize = (int) $endsize;
        $midsize = (int) $midsize;
        // Setup argument array for paginate_links()
        $pagination = array('base' => @add_query_arg('paged', '%#%'), 'format' => '', 'total' => $wp_query->max_num_pages, 'current' => $current, 'show_all' => false, 'end_size' => $endsize, 'mid_size' => $midsize, 'type' => $type, 'prev_text' => __('&larr; Previous', 'agency'), 'next_text' => __('Next &rarr;', 'agency'));
        if ($wp_rewrite->using_permalinks()) {
            $pagination['base'] = user_trailingslashit(trailingslashit(remove_query_arg('s', get_pagenum_link(1))) . 'page/%#%/', 'paged');
        }
        if (!empty($wp_query->query_vars['s'])) {
            $pagination['add_args'] = array('s' => get_query_var('s'));
        }
        echo "<p><strong>" . paginate_links($pagination) . "</strong></p>";
    }
    echo '  </div>' . "\n";
}
Esempio n. 6
0
    function section_template()
    {
        ?>
		<?php 
        if (function_exists('wp_pagenavi') && show_posts_nav() && VPRO) {
            ?>
 
			<?php 
            wp_pagenavi();
            ?>
  
		<?php 
        } elseif (show_posts_nav()) {
            ?>
			<div class="page-nav-default fix">
				<span class="previous-entries"><?php 
            next_posts_link(__('&larr; Previous Entries', 'pagelines'));
            ?>
</span>
				<span class="next-entries"><?php 
            previous_posts_link(__('Next Entries &rarr;', 'pagelines'));
            ?>
</span>
			</div><!-- page nav -->
		<?php 
        }
        ?>
		
	<?php 
    }
Esempio n. 7
0
function comicpress_pagination()
{
    global $post, $wp_query;
    if (function_exists('wp_pagenavi')) {
        ?>
		<?php 
        wp_pagenavi('<div id="wp-paginav">', '<div class="clear"></div></div>');
        ?>
	<?php 
    } else {
        ?>
		<div id="pagenav">
		<div class="pagenav-right"><?php 
        previous_posts_link(__('Newer Entries &uarr;', 'comicpress'));
        ?>
</div>
		<div class="pagenav-left"><?php 
        next_posts_link(__('&darr; Previous Entries', 'comicpress'));
        ?>
</div>
		<div class="clear"></div>
		</div>
	<?php 
    }
}
Esempio n. 8
0
function ProjectTheme_my_account_completed_projects_area_function()
{
    global $current_user, $wpdb, $wp_query;
    get_currentuserinfo();
    $uid = $current_user->ID;
    ?>
    	<div id="content" class="account-main-area">
        
        
         
				
                
                <?php 
    global $current_user;
    get_currentuserinfo();
    $uid = $current_user->ID;
    global $wp_query, $wpdb;
    $query_vars = $wp_query->query_vars;
    $post_per_page = 10;
    $querystr = "\n                        SELECT p.ID \n                        FROM {$wpdb->posts} AS p\n                        LEFT JOIN {$wpdb->prefix}project_bids AS pb ON p.ID = pb.pid\n                        WHERE   p.post_author = '{$uid}'\n                            AND pb.winner = '1'\n                            AND pb.paid = '1'\n                            AND p.post_type = 'project' ";
    $pageposts = $wpdb->get_col($querystr);
    if (empty($pageposts)) {
        echo '<div class="my_box3 border_bottom_0"> <div class="box_content">   ';
        _e("There are no completed projects yet.", 'ProjectTheme');
        echo '</div>  </div> ';
    } else {
        //				$paid = array(
        //						'key' => 'paid_user',
        //						'value' => "1",
        //						'compare' => '='
        //					);
        //
        //				$args = array('post_type' => 'project','author' => $uid, 'order' => 'DESC', 'orderby' => 'date', 'posts_per_page' => $post_per_page,
        //				'paged' => $query_vars['paged'], 'meta_query' => array($paid));
        $args = array('post_type' => 'project', 'author' => $uid, 'order' => 'DESC', 'orderby' => 'date', 'posts_per_page' => $post_per_page, 'paged' => $query_vars['paged'], 'post__in' => $pageposts);
        query_posts($args);
        if (have_posts()) {
            while (have_posts()) {
                the_post();
                projectTheme_get_post_paid();
            }
            if (function_exists('wp_pagenavi')) {
                wp_pagenavi();
            }
        } else {
            echo '<div class="my_box3 border_bottom_0"> <div class="box_content">   ';
            _e("There are no completed projects yet.", 'ProjectTheme');
            echo '</div>  </div> ';
        }
        wp_reset_query();
    }
    ?>
        
   
        
  		</div>      
<?php 
    ProjectTheme_get_users_links();
}
Esempio n. 9
0
function ProjectTheme_my_account_bid_projects_area_function()
{
    global $current_user, $wpdb, $wp_query;
    get_currentuserinfo();
    $uid = $current_user->ID;
    ?>
    	<div id="content" class="account-main-area">
 

                <?php 
    global $wp_query;
    $query_vars = $wp_query->query_vars;
    $post_per_page = 10;
    /*$winner = 	array(
    			'key' => 'bid',
    			'value' => $uid,
    			'compare' => '='
    		);*/
    global $wpdb;
    $s = "select * from " . $wpdb->prefix . "project_bids where uid='{$uid}'";
    $r = $wpdb->get_results($s);
    foreach ($r as $k => $rr) {
        $pids[] = $rr->pid;
    }
    /*$str_pids = implode(',', $pids);
    
    				var_dump($str_pids);*/
    $args = array('post_type' => 'project', 'order' => 'DESC', 'orderby' => 'date', 'posts_per_page' => $post_per_page, 'paged' => $query_vars['paged'], 'post__in' => $pids);
    query_posts($args);
    $a = 0;
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            $a += projectTheme_get_post_my_proposal();
        }
        if (function_exists('wp_pagenavi') && !$a) {
            wp_pagenavi();
        }
    } else {
        echo '<div class="my_box3 border_bottom_0"> <div class="box_content">   ';
        _e("You have not submitted any proposals yet.", 'ProjectTheme');
        echo '</div>  </div> ';
    }
    if ($a) {
        echo '<div class="my_box3"><div class="box_content">';
        _e("There are no projects yet.", 'ProjectTheme');
        echo '</div></div>';
    }
    wp_reset_query();
    ?>
                
         
        
  		</div>      
<?php 
    ProjectTheme_get_users_links();
}
Esempio n. 10
0
function woocommerceframework_pagination()
{
    $features = get_setting_array('shop_loop_top_bar', array());
    $pagination_pos = get_setting('shop_pagination_pos', 'bottom');
    if (in_array('pagination', $features) && $pagination_pos && ('bottom' == $pagination_pos || 'both' == $pagination_pos)) {
        $args = array('container_class' => 'pagination pagination-lg pull-right', 'echo' => false);
        echo '<div class="row"><div class="col-md-12">' . wp_pagenavi($args) . '</div></div>';
    }
}
Esempio n. 11
0
function PricerrTheme_blog_posts_area_function()
{
    global $current_user;
    get_currentuserinfo();
    $uid = $current_user->ID;
    ?>
    
        
   <div id="content">
			      <div class="my_box3">
            	<div class="padd10">
                    
            
            		<div class="box_title"><?php 
    echo __("All Blog Posts", 'PricerrTheme');
    ?>
</div>
                    
              
            		<div class="box_content">
                    
                    <?php 
    $args = array('post_type' => 'post', 'paged' => get_query_var('paged'));
    $my_query = new WP_Query($args);
    if ($my_query->have_posts()) {
        while ($my_query->have_posts()) {
            $my_query->the_post();
            PricerrTheme_get_post_blog();
        }
        if (function_exists('wp_pagenavi')) {
            wp_pagenavi(array('query' => $my_query));
        }
    } else {
        _e('There are no posts.', 'PricerrTheme');
    }
    ?>
                    
                    </div></div>
  </div></div>
    
    
      <!-- ################### -->
    
    <div id="right-sidebar">    
    	<ul class="xoxo">
        	 <?php 
    dynamic_sidebar('other-page-area');
    ?>
        </ul>    
    </div>
    
    
      
    
    <?php 
}
Esempio n. 12
0
    function hepouf_content_nav($nav_id)
    {
        global $wp_query, $post;
        // Don't print empty markup on single pages if there's nowhere to navigate.
        if (is_single()) {
            $previous = is_attachment() ? get_post($post->post_parent) : get_adjacent_post(false, '', true);
            $next = get_adjacent_post(false, '', false);
            if (!$next && !$previous) {
                return;
            }
        }
        // Don't print empty markup in archives if there's only one page.
        if ($wp_query->max_num_pages < 2 && (is_home() || is_archive() || is_search())) {
            return;
        }
        $nav_class = is_single() ? 'post-navigation' : 'paging-navigation';
        ?>
	<nav role="navigation" id="<?php 
        echo esc_attr($nav_id);
        ?>
" class="<?php 
        echo $nav_class;
        ?>
">

	<?php 
        if (is_single()) {
            // navigation links for single posts
            ?>

		<?php 
            previous_post_link('<div class="nav-previous">%link</div>', '<span class="meta-nav">' . _x('<i class="ico-left-open"></i>', 'Previous post link', 'athemes') . '</span> %title');
            ?>
		<?php 
            next_post_link('<div class="nav-next">%link</div>', '%title <span class="meta-nav">' . _x('<i class="ico-right-open"></i>', 'Next post link', 'athemes') . '</span>');
            ?>

	<?php 
        } elseif ($wp_query->max_num_pages > 1 && (is_home() || is_archive() || is_search())) {
            // navigation links for home, archive, and search pages
            ?>

<?php 
            wp_pagenavi();
            ?>

	<?php 
        }
        ?>

	</nav><!-- #<?php 
        echo esc_html($nav_id);
        ?>
 -->
	<?php 
    }
Esempio n. 13
0
function ProjectTheme_my_account_delivered_projects_area_function()
{
    global $current_user, $wpdb, $wp_query;
    get_currentuserinfo();
    $uid = $current_user->ID;
    ?>
    	<div id="content">
        
        
        	<div class="my_box3 border_bottom_0">
            	
            
            	<div class="box_title"><?php 
    _e("Delivered Projects", 'ProjectTheme');
    ?>
</div>
                <div class="box_content">    
				
                
  <?php 
    global $current_user;
    get_currentuserinfo();
    $uid = $current_user->ID;
    global $wp_query;
    $query_vars = $wp_query->query_vars;
    $post_per_page = 10;
    $outstanding = array('key' => 'delivered', 'value' => "1", 'compare' => '=');
    $paid_user = array('key' => 'paid_user', 'value' => "1", 'compare' => '=');
    $winner = array('key' => 'winner', 'value' => $uid, 'compare' => '=');
    $args = array('post_type' => 'project', 'order' => 'DESC', 'orderby' => 'date', 'posts_per_page' => $post_per_page, 'paged' => $query_vars['paged'], 'meta_query' => array($outstanding, $winner, $paid_user));
    query_posts($args);
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            projectTheme_get_post();
        }
        if (function_exists('wp_pagenavi')) {
            wp_pagenavi();
        }
    } else {
        _e("There are no delivered projects yet.", 'ProjectTheme');
    }
    wp_reset_query();
    ?>
                
                
               
           </div>
           </div>    
        
        
  		</div>      
<?php 
    ProjectTheme_get_users_links();
}
Esempio n. 14
0
function lightseek_link_pages()
{
    global $post;
    if (is_single()) {
        if (function_exists('wp_pagenavi')) {
            wp_pagenavi(array('type' => 'multipart'));
        } else {
            wp_link_pages(array('before' => '<div class="page-links">' . esc_html__('Pages:', '_lightseek'), 'after' => '</div>'));
        }
    }
}
Esempio n. 15
0
 /**
  *
  * @param type $link
  * @param type $position
  * @return type
  */
 function raindrops_use_wp_pagenav($link, $position)
 {
     if ('yes' == get_theme_mod('raindrops_wp_pagenavi_status') && 'yes' == raindrops_warehouse_clone('raindrops_plugin_presentation_wp_pagenav')) {
         if (function_exists('wp_pagenavi') and $position == 'nav-below') {
             return wp_pagenavi(array('echo' => false, 'options' => array('prev_text' => esc_html__('Prev', 'raindrops'), 'next_text' => esc_html__('Next', 'raindrops'))));
         } else {
             return $link;
         }
     }
     return;
 }
 private function paging_nav()
 {
     global $wp_query;
     if (function_exists('wp_pagenavi')) {
         wp_pagenavi();
         return;
     }
     echo '<div class="wp-pagenavi">';
     $links = paginate_links(array('total' => $wp_query->max_num_pages, 'current' => max(1, get_query_var('paged')), 'mid_size' => 3, 'type' => 'list'));
     echo $links;
     echo '</div>';
 }
function ProjectTheme_display_all_prjs_page_disp()
{
    global $current_user;
    get_currentuserinfo();
    $uid = $current_user->ID;
    ?>
    
        
   <div id="content">
			
            
            		<div class="box_title"><?php 
    echo __("All Posted Projects", 'ProjectTheme');
    ?>
</div>
            		<div class="box_content">
                    
                    <?php 
    global $wp_query;
    $query_vars = $wp_query->query_vars;
    $posts_per_page = 8;
    $posts_per_page = apply_filters('ProjectTheme_all_projects_page_per_page', $posts_per_page);
    $args = array('post_type' => 'project', 'paged' => $query_vars['paged'], 'posts_per_page' => $posts_per_page);
    $my_query = new WP_Query($args);
    if ($my_query->have_posts()) {
        while ($my_query->have_posts()) {
            $my_query->the_post();
            ProjectTheme_get_post();
        }
        if (function_exists('wp_pagenavi')) {
            wp_pagenavi(array('query' => $my_query));
        }
    } else {
        _e('There are no projects posted.', 'ProjectTheme');
    }
    ?>
                    
                    </div>
  </div>
    
    
      <!-- ################### -->
    
    <div id="right-sidebar">    
    	<ul class="xoxo">
        	 <?php 
    dynamic_sidebar('other-page-area');
    ?>
        </ul>    
    </div>
    
    <?php 
}
function ProjectTheme_my_account_unpublished_projects_area_function()
{
    global $current_user, $wpdb, $wp_query;
    get_currentuserinfo();
    $uid = $current_user->ID;
    ?>
    	<div id="content">
        
        
        	<div class="my_box3 border_bottom_0">
            	
            
            	<div class="box_title"><?php 
    _e("Unpublished Projects", 'ProjectTheme');
    ?>
</div>
                <div class="box_content">    
				
                
                <?php 
    global $wp_query;
    $query_vars = $wp_query->query_vars;
    $post_per_page = 10;
    $paids = array('key' => 'paid', 'value' => "0", 'compare' => '=');
    $args = array('post_type' => 'project', 'order' => 'DESC', 'orderby' => 'date', 'post_status' => 'draft', 'author' => $uid, 'posts_per_page' => $post_per_page, 'paged' => $query_vars['paged'], 'meta_query' => array($paids));
    query_posts($args);
    //query_posts( "post_status=draft&meta_key=paid&meta_value=0&post_type=project&order=DESC&orderby=id&author=".$uid.
    //"&posts_per_page=".$post_per_page."&paged=".$query_vars['paged'] );
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            projectTheme_get_post(array('unpaid'));
        }
        if (function_exists('wp_pagenavi')) {
            wp_pagenavi();
        }
    } else {
        _e("There are no projects yet.", 'ProjectTheme');
    }
    wp_reset_query();
    ?>
                
                
               
           </div>
           </div>    
        
        
  		</div>      
<?php 
    ProjectTheme_get_users_links();
}
Esempio n. 19
0
function ProjectTheme_my_account_active_projects_area_function()
{
    global $current_user, $wpdb, $wp_query;
    get_currentuserinfo();
    $uid = $current_user->ID;
    ?>
    	<div id="content">
        
        
        
                <div class="my_box3 border_bottom_0">
            	
            
            	<div class="box_title"><?php 
    _e("My Active Projects", 'ProjectTheme');
    ?>
</div>
                <div class="box_content">    
				
                
                <?php 
    global $wp_query;
    $query_vars = $wp_query->query_vars;
    $post_per_page = 5;
    query_posts("meta_key=closed&meta_value=0&post_type=project&order=DESC&orderby=id&author=" . $uid . "&posts_per_page=" . $post_per_page . "&paged=" . $query_vars['paged']);
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            projectTheme_get_post_active();
        }
        if (function_exists('wp_pagenavi')) {
            wp_pagenavi();
        }
    } else {
        _e("There are no projects yet.", 'ProjectTheme');
    }
    wp_reset_query();
    ?>
                
                
               
           </div>
           </div>    
		
        
        
  		</div>      
<?php 
    ProjectTheme_get_users_links();
}
Esempio n. 20
0
    /**
     * Display navigation to next/previous set of posts when applicable.
     *
     * If the wp_pagenavi plugin is installed, it's pagination will be used.
     * See: http://wordpress.org/plugins/wp-pagenavi/
     *
     * @return void
     */
    function govpress_paging_nav()
    {
        // Don't print empty markup if there's only one page.
        if ($GLOBALS['wp_query']->max_num_pages < 2) {
            return;
        }
        ?>
	<nav class="navigation paging-navigation" role="navigation">
		<h1 class="screen-reader-text"><?php 
        _e('Posts navigation', 'govpress');
        ?>
</h1>
		<div class="nav-links">

			<?php 
        if (function_exists('wp_pagenavi')) {
            wp_pagenavi();
        } else {
            ?>

				<?php 
            if (get_next_posts_link()) {
                ?>
				<div class="nav-previous"><?php 
                next_posts_link(__('<span class="meta-nav">&larr;</span> Older posts', 'govpress'));
                ?>
</div>
				<?php 
            }
            ?>

				<?php 
            if (get_previous_posts_link()) {
                ?>
				<div class="nav-next"><?php 
                previous_posts_link(__('Newer posts <span class="meta-nav">&rarr;</span>', 'govpress'));
                ?>
</div>
				<?php 
            }
            ?>

			<?php 
        }
        ?>

		</div><!-- .nav-links -->
	</nav><!-- .navigation -->
	<?php 
    }
Esempio n. 21
0
    /**
     * Display navigation to next/previous set of posts when applicable.
     */
    function amplify_paging_nav()
    {
        // Don't print empty markup if there's only one page.
        if ($GLOBALS['wp_query']->max_num_pages < 2) {
            return;
        }
        ?>

	<?php 
        if (function_exists('wp_pagenavi')) {
            //WP PageNavi support
            wp_pagenavi();
        } else {
            ?>
	<nav class="navigation paging-navigation" role="navigation">
		<h1 class="screen-reader-text"><?php 
            _e('Posts navigation', 'amplify');
            ?>
</h1>
		<div class="nav-links">

			<?php 
            if (get_next_posts_link()) {
                ?>
			<div class="nav-previous"><?php 
                next_posts_link('<i class="fa fa-long-arrow-left"></i>');
                ?>
</div>
			<?php 
            }
            ?>

			<?php 
            if (get_previous_posts_link()) {
                ?>
			<div class="nav-next"><?php 
                previous_posts_link('<i class="fa fa-long-arrow-right"></i>');
                ?>
</div>
			<?php 
            }
            ?>

		</div><!-- .nav-links -->
	</nav><!-- .navigation -->
	<?php 
        }
    }
Esempio n. 22
0
function mdc_posts_navigation()
{
    ?>
  <div class="posts-navigation-wrap">
    <div class="container">
      <?php 
    if (function_exists('wp_pagenavi')) {
        wp_pagenavi();
    } else {
        the_posts_navigation();
    }
    ?>
    </div>
  </div>
  <?php 
}
Esempio n. 23
0
function ProjectTheme_display_blog_page_disp()
{
    global $current_user, $wp_query;
    get_currentuserinfo();
    $uid = $current_user->ID;
    $paged = $wp_query->query_vars['paged'];
    ?>
    
        
   <div id="content">
			
            
            		 
            		<div class="box_content">
                    
                    <?php 
    $args = array('post_type' => 'post', 'paged' => $paged);
    $my_query = new WP_Query($args);
    if ($my_query->have_posts()) {
        while ($my_query->have_posts()) {
            $my_query->the_post();
            ProjectTheme_get_post_blog();
        }
        if (function_exists('wp_pagenavi')) {
            wp_pagenavi(array('query' => $my_query));
        }
    } else {
        _e('There are no posts.', 'ProjectTheme');
    }
    ?>
                    
                    </div>
  </div>
    
    
      <!-- ################### -->
    
    <div id="right-sidebar">    
    	<ul class="xoxo">
        	 <?php 
    dynamic_sidebar('other-page-area');
    ?>
        </ul>    
    </div>
    
    <?php 
}
Esempio n. 24
0
}
function _paginate()
{
    echo "<div>";
    if (function_exists('wp_pagenavi')) {
        wp_pagenavi();
    } else {
        ?>
		<p class="pagination"> <?php 
        previous_posts_link("P&aacute;gina anterior");
        ?>
 <?php 
        next_posts_link("Pr&oacute;xima p&aacute;gina");
        ?>
</p>
<?php 
    }
 function mk_page_navi()
 {
     global $data, $post, $wp_query;
     $layout = strtolower(get_theme_mod('mk_blog_layout', 'classic'));
     $out = '';
     $out .= '<div class="clearfix"></div>' . "\n";
     $out .= '<div class="pagination-wrapper ' . $layout . '-pagination text-center">' . "\n";
     if (function_exists('wp_pagenavi')) {
         $out .= wp_pagenavi() . "\n";
     } else {
         $out .= '<div class="pagination-wrap">' . "\n";
         $out .= mk_pagenavi($wp_query) . "\n";
         $out .= '</div>' . "\n";
     }
     $out .= '</div>' . "\n";
     echo $out;
 }
Esempio n. 26
0
function bfa_next_previous_page_links($location = "Top")
{
    global $bfa_ata;
    if (!is_single() and !is_page() and strpos($bfa_ata['location_multi_next_prev'], $location) !== FALSE and intval(get_query_var('email')) != 1 and show_posts_nav()) {
        if (function_exists('wp_pagenavi')) {
            echo '<div class="wp-pagenavi-navigation">';
            wp_pagenavi();
            echo '</div>';
        } else {
            echo '<div class="navigation-' . strtolower($location) . '">
			<div class="older' . $nav_home_add . '">';
            $bfa_ata['next_prev_orientation'] == 'Older Left, Newer Right' ? next_posts_link($bfa_ata['multi_next_prev_older']) : previous_posts_link($bfa_ata['multi_next_prev_newer']);
            echo ' &nbsp;</div>' . $nav_home_div . '<div class="newer' . $nav_home_add . '">&nbsp; ';
            $bfa_ata['next_prev_orientation'] == 'Older Left, Newer Right' ? previous_posts_link($bfa_ata['multi_next_prev_newer']) : next_posts_link($bfa_ata['multi_next_prev_older']);
            echo '</div><div class="clearboth"></div></div>';
        }
    }
}
 /**
  * Posts navigation
  *
  * @since Magzimum 1.0
  *
  */
 function magzimum_custom_posts_navigation()
 {
     $pagination_type = magzimum_get_option('pagination_type');
     switch ($pagination_type) {
         case 'default':
             the_posts_navigation();
             break;
         case 'numeric':
             if (function_exists('wp_pagenavi')) {
                 wp_pagenavi();
             } else {
                 the_posts_navigation();
             }
             break;
         default:
             break;
     }
 }
function bfa_next_previous_page_links($location = "Top")
{
    global $bfa_ata, $homeURL;
    if (!is_single() and !is_page() and strpos($bfa_ata['location_multi_next_prev'], $location) !== FALSE and intval(get_query_var('email')) != 1 and show_posts_nav()) {
        if (function_exists('wp_pagenavi')) {
            echo '<div class="wp-pagenavi-navigation">';
            wp_pagenavi();
            echo '</div>';
        } else {
            if ($bfa_ata['home_multi_next_prev'] != '') {
                ob_start();
                echo '<div class="home"><a href="' . $homeURL . '/">' . $bfa_ata['home_multi_next_prev'] . '</a></div>';
                $nav_home_div_on = ob_get_contents();
                ob_end_clean();
                // for WP 2.5 and newer
                if (function_exists('is_front_page')) {
                    // make sure this is the real homepage and not a subsequent page
                    if (is_front_page() and !is_paged()) {
                        $nav_home_add = "";
                        $nav_home_div = "";
                    } else {
                        $nav_home_add = '-home';
                        $nav_home_div = $nav_home_div_on;
                    }
                } elseif (is_home() and !is_paged()) {
                    $nav_home_add = "";
                    $nav_home_div = "";
                } else {
                    $nav_home_add = '-home';
                    $nav_home_div = $nav_home_div_on;
                }
            } else {
                $nav_home_add = '';
                $nav_home_div = '';
            }
            echo '<div class="clearfix navigation-' . strtolower($location) . '">
			<div class="older' . $nav_home_add . '">';
            $bfa_ata['next_prev_orientation'] == 'Older Left, Newer Right' ? next_posts_link($bfa_ata['multi_next_prev_older']) : previous_posts_link($bfa_ata['multi_next_prev_newer']);
            echo ' &nbsp;</div>' . $nav_home_div . '<div class="newer' . $nav_home_add . '">&nbsp; ';
            $bfa_ata['next_prev_orientation'] == 'Older Left, Newer Right' ? previous_posts_link($bfa_ata['multi_next_prev_newer']) : next_posts_link($bfa_ata['multi_next_prev_older']);
            echo '</div></div>';
        }
    }
}
Esempio n. 29
0
function ProjectTheme_my_account_area_awaiting_completion_function()
{
    global $current_user, $wpdb, $wp_query;
    get_currentuserinfo();
    $uid = $current_user->ID;
    ?>
    	<div id="content" class="account-main-area">
        
        
          
				
                
                <?php 
    global $current_user;
    get_currentuserinfo();
    $uid = $current_user->ID;
    global $wp_query;
    $query_vars = $wp_query->query_vars;
    $post_per_page = 10;
    $outstanding = array('key' => 'outstanding', 'value' => "1", 'compare' => '=');
    $args = array('post_type' => 'project', 'author' => $uid, 'order' => 'DESC', 'orderby' => 'date', 'posts_per_page' => $post_per_page, 'paged' => $query_vars['paged'], 'meta_query' => array($outstanding));
    query_posts($args);
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            projectTheme_get_post_awaiting_compl();
        }
        if (function_exists('wp_pagenavi')) {
            wp_pagenavi();
        }
    } else {
        echo '<div class="my_box3 border_bottom_0"> <div class="box_content">   ';
        _e("There are no projects yet.", 'ProjectTheme');
        echo '</div>  </div> ';
    }
    wp_reset_query();
    ?>
                
      
        
  		</div>      
<?php 
    ProjectTheme_get_users_links();
}
Esempio n. 30
0
    /**
     * Display navigation to next/previous set of posts when applicable.
     *
     * @return void
     */
    function sparkling_paging_nav()
    {
        // Don't print empty markup if there's only one page.
        if ($GLOBALS['wp_query']->max_num_pages < 2) {
            return;
        }
        ?>
	<nav class="navigation paging-navigation" role="navigation">
		<h1 class="screen-reader-text"><?php 
        esc_html_e('Posts navigation', 'sparkling');
        ?>
</h1>
		<div class="nav-links">
			<?php 
        if (function_exists('wp_pagenavi')) {
            wp_pagenavi();
        } else {
            if (get_next_posts_link()) {
                ?>
					<div class="nav-previous"> <?php 
                next_posts_link(__('<i class="fa fa-chevron-left"></i> Older posts', 'sparkling'));
                ?>
</div>
				<?php 
            }
            ?>

				<?php 
            if (get_previous_posts_link()) {
                ?>
					<div class="nav-next"><?php 
                previous_posts_link(__('Newer posts <i class="fa fa-chevron-right"></i>', 'sparkling'));
                ?>
 </div>
				<?php 
            }
        }
        ?>

		</div><!-- .nav-links -->
	</nav><!-- .navigation -->
	<?php 
    }