WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Posts for Page] Feature request: WP-PageNavi

[Resolved] [Plugin: Posts for Page] Feature request: WP-PageNavi

  • 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/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author sihibbs
    Member

    @sihibbs

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

    Plugin Author sihibbs
    Member

    @sihibbs

    Ok this has gone onto the list of update requests.

    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!

    productioncat
    Member

    @productioncat

    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.

    productioncat
    Member

    @productioncat

    [ 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;
    
    }
    productioncat
    Member

    @productioncat

    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.

    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

    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

    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

    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

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

    ok thanks…

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Resolved] [Plugin: Posts for Page] Feature request: WP-PageNavi’ is closed to new replies.