WordPress.org

Ready to get started?Download WordPress

Forums

Posts for Page
[resolved] Feature request: WP-PageNavi (13 posts)

  1. brasofilo
    Member
    Posted 1 year ago #

    Would be nice if the plugin supported WP-PageNavi.

    I've added this to posts-for-page.php:

    if( function_exists('wp_pagenavi')) {
    		$output .= wp_pagenavi( array( 'echo' => false) );
    	} else {
    		if($_opts['cur_page'] > 1) {
    			$output .= "<span class='pfpNav'>" . get_previous_posts_link($_opts['prevText']) . "</span>";
    		}
    		if($_opts['cur_page'] <  $page_links_total) {
    			$output .= "<span class='pfpNav'>" . get_next_posts_link($_opts['nextText']) . "</span>";
    		}
    	}

    http://wordpress.org/extend/plugins/posts-for-page/

  2. sihibbs
    Member
    Plugin Author

    Posted 1 year ago #

    Ok thanks for the input looks good, I will look into including it into the next release.

  3. sihibbs
    Member
    Plugin Author

    Posted 1 year ago #

    Ok this has gone onto the list of update requests.

  4. soret
    Member
    Posted 1 year ago #

    Hello! I tried the plugin and it looks great, but I need the PageNavi to work... I haven't tested out the above code yet, does it work well? Is the next update coming up anytime soon? If I use the code above before updating the plugin, will I get two paginations whenever the update comes out?
    Thank you both, and great plugin! Will rate five star!

  5. productioncat
    Member
    Posted 1 year ago #

    I add the same code to posts-for-page.php
    But why my pagination always leads to the same page (first page).

    Here is the link.
    http://www.niagarafreefun.ca/niagara-events-complete-list/

    Thanks.

  6. productioncat
    Member
    Posted 1 year ago #

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]

    global $wp_query;
        $page_links_total =  $wp_query->max_num_pages;
    
    if( function_exists('wp_pagenavi')) {
    		$output .= wp_pagenavi( array( 'echo' => false) );
    	} 
    
    	else {
    		if($_opts['cur_page'] > 1) {
    			$output .= "<span class='pfpNav'>" . get_previous_posts_link($_opts['prevText']) . "</span>";
    		}
    		if($_opts['cur_page'] <  $page_links_total) {
    			$output .= "<span class='pfpNav'>" . get_next_posts_link($_opts['nextText']) . "</span>";
    		}
    	}
    
    	wp_reset_query();
    	return $output;
    
    }
  7. productioncat
    Member
    Posted 1 year ago #

    It's fixed by putting short code on a page instead of on a post. But Another thing comes up. How to let pagination shows both on the top and at the bottom? Currently, I use wp_paginate on the POSTS FOR PAGE plugin, and it only shows on the top of the page.

  8. RLL18
    Member
    Posted 1 year ago #

    I was able to get my pagination to look like wp-pagenavi, but it is always still leading to the first page. Can someone please walk me through how to fix this issue? I have the shortcode on my homepage...

    gigglelounge.net

  9. missi1976
    Member
    Posted 10 months ago #

    hello together,
    is it possible to include some other pagination wp plugins like the example with wp-pagenavi here?

    I tried to install wp-pagenavi but after activation I get an error message:

    Fatal error: Cannot redeclare wp_pagenavi() (previously declared in /var/www/vhosts/XXX/XXX/wp-content/themes/Karma/truethemes_framework/extended/wp-pagenavi.php:44) in /var/www/vhosts/XXXX/XXXX/wp-content/plugins/wp-pagenavi/core.php on line 182

  10. missi1976
    Member
    Posted 10 months ago #

    hello again,
    after some tests I managed the combination of wp-pagenavi with this great plugin. works fine so far. but one question is still open... the navigation appears on page top. what I have to change that the navigation appears at the bottom? thanks in advanced for help...

    best wishes missi1976

  11. missi1976
    Member
    Posted 10 months ago #

    for better understanding I've just made a screen U see here --> http://goo.gl/ccqQxj

    number (arrow) 1: it displays "array" in the left corner. but why? is it an error in the php code? how can I change this issue?

    number 2: this complete navigation should appear under my articles / posts. Is it possible?

    thanks missi1976

  12. brasofilo
    Member
    Posted 10 months ago #

    missi1976, open your own thread, this one is marked as [resolved].

  13. missi1976
    Member
    Posted 10 months ago #

    ok thanks...

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic