WordPress.org

Ready to get started?Download WordPress

Forums

Weaver II
[resolved] How to go to next page for blogs (5 posts)

  1. DazzelDum
    Member
    Posted 9 months ago #

    Hello there!

    On the "blog" page, shouldn't there be more pages to go to listed at the bottom?

    My general settings are at ten per page.

    I have more than that but there are no page numbers to go to page 2 and find the rest. This must be an easy setting.

    Thank you for your help, Mary

  2. Sunny Johal - Titanium Themes
    Member
    Posted 9 months ago #

    Hi Mary,
    The theme that you are using must not have implemented pagination. To implement pagination you would use the paginate_links() function and include it where ever you want the pagination to appear. Here is what I would do for your example:

    Step 1: Create a pagination function in your functions.php file so you can reuse it throughout your theme. That would look something like this:

    /**
     * Define Pagination Args Array ( Chronological Order )
     *
     * Retrieve paginated link for archive post pages.
     * Technically, the function can be used to create
     * paginated link list for any area.
     *
     * @link http://codex.wordpress.org/Function_Reference/paginate_links 	paginate_links()
     *
     * @version  1.0
     */
    function custom_theme_pagination() {
    	global $wp_query; 	// Get the global WPQuery variable
    	$big = 999999999; 
    
    	$args = array(
    		'base'			=> str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),									// Used to reference the url, which will be used to create the paginated links
    		'format'		=> '?page=%#%', 							// Used for Pagination structure
    		'total'			=> $wp_query->max_num_pages,				// The total amount of pages
    		'current'		=> (get_query_var('paged') ? get_query_var('paged') : 1), 										// The current page number
    		'show_all' 		=> false,
    		'end_size'		=> 2,										// If set to true, then it will show all of the pages instead of a short list of the pages near the current page
    		'mid_size'		=> 2,
    		'prev_next'		=> true,
    		'prev_text'		=> __( '« Newer', 'theme-translate' ),
    		'next_text'		=> __( 'Older »', 'theme-translate' ),
    		'type'			=> 'list',
    		'add_args'		=> false,
    		'add_fragment'	=> ''
    	);
    	?>
    	<div class="">
    		<?php echo paginate_links( $args ); ?>
    	</div>
    	<?php
    }

    Step 2: Call the custom_theme_pagination(); function whereever you want it to appear in your archive.php or other blog templates.

    Hope that helps

    Sunny

  3. WPyogi
    Volunteer Moderator
    Posted 9 months ago #

    I'd suggest asking on the Weaver Theme's dedicated forum here:

    http://forum.weavertheme.com/

    The developer has excellent support there.

  4. DazzelDum
    Member
    Posted 9 months ago #

    Thank you. I thought I was on the "theme" forum.

    Changing files is too complicated for me.
    I am sure it is just a check box somewhere in the customization.
    Thanks so much for your reply!

  5. DazzelDum
    Member
    Posted 9 months ago #

    Hello to all of you. I thank you for trying but I finally did figure it out.
    This is weaver 2. I clicked "hide bottom links" in the post navigation.
    It was just a click! Weaver is so customizable, I got lost.

    Thank you all for your support. It means a lot!

Reply

You must log in to post.

About this Theme

About this Topic