Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Nick the Geek

    (@nick_thegeek)

    what version of WordPress are you using?

    Thread Starter EricaMueller

    (@ericamueller)

    3.4

    Plugin Author Nick the Geek

    (@nick_thegeek)

    I believe that some changes to the way the query works is preventing my filter from allowing the pagination when there is a difference in the posts per page setting and the max posts per page in the Reading Settings with WP 3.4

    This means you will need to tell it about your query via the pre_get_posts filter in your functions.php to get the pagination to work right. Here is a really good tutorial on that
    http://www.billerickson.net/customize-the-wordpress-query/

    Try something like this in your functions.php. Assuming you have home-bottom as the instance custom field.

    add_action( 'pre_get_posts', 'wps_gfwa_posts_per_page' );
    function wps_gfwa_posts_per_page( $query ) {
    	if ( 'home-bottom' == get_query_var( 'gfwa' ) && ! is_admin() ) {
    		$query->set( 'posts_per_page', '4' ); // CHANGE ME!
    	}
    }
    
    add_filter( 'gfwa_query_args', 'wps_gfwa_query_args', 10, 2 );
    function wps_gfwa_query_args( $query_args, $instance ) {
    
    	$query_args['gfwa'] = $instance['custom_field'];
    
    	return $query_args;
    }

    Nick may want to add the wps_gfwa_query_args() as part of his plugin in the future.

    The solution that Travis posted works great.

    Thanks much Travis!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Genesis Featured Widget Amplified] Pagination Not Working’ is closed to new replies.