diff --git a/README.md b/README.md index 591e507..2b81c0c 100644 --- a/README.md +++ b/README.md @@ -45,8 +45,8 @@ This plugin allows beer creators from home brewers to professional breweries to ### Latest Release ### -#### [Version 1.9.2 - Major Bug Fix](https://github.com/ErinMorelli/em-beer-manager/releases/tag/v1.9.2) ### -* Fixed major issue with comments setting overriding site-wide comments +#### [Version 1.9.3 - Minor Bug Fix](https://github.com/ErinMorelli/em-beer-manager/releases/tag/v1.9.3) ### +* Fixed bug with beer-list shortcode pagination not working on index pages diff --git a/README.txt b/README.txt index 2482675..5411adc 100644 --- a/README.txt +++ b/README.txt @@ -3,8 +3,8 @@ Contributors: ErinMorelli Donate link: http://erinmorelli.com/wordpress/ Tags: beer, beers, brewery, untappd Requires at least: 3.0.1 -Tested up to: 3.6.0 -Stable tag: 1.9.2 +Tested up to: 3.6.1 +Stable tag: 1.9.3 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -148,6 +148,9 @@ Try refreshing your permalinks by going to "Settings" -> "Permalinks" and clicki == Changelog == += 1.9.3 = +* Fixed bug with beer-list shortcode pagination not working on index pages + = 1.9.2 = * Fixed major issue with comments setting overriding site-wide comments diff --git a/em-beer-manager.php b/em-beer-manager.php index 24b74b1..968873d 100644 --- a/em-beer-manager.php +++ b/em-beer-manager.php @@ -3,7 +3,7 @@ * Plugin Name: EM Beer Manager * Plugin URI: http://erinmorelli.com/wordpress/em-beer-manager * Description: Catalog and display your beers with WordPress. Integrates very simply with Untappd for individual beer checkins. Great for everyone from home brewers to professional breweries! - * Version: 1.9.2 + * Version: 1.9.3 * Author: Erin Morelli * Author URI: http://erinmorelli.com/ * License: GPLv2 or later @@ -45,7 +45,7 @@ function embm_plugin_load(){ function embm_plugin_activation() { // Check for new version - $embm_curr_version = '1.9.2'; + $embm_curr_version = '1.9.3'; if (!defined('EMBM_VERSION_KEY')) { // Define new version option diff --git a/includes/output.php b/includes/output.php index 94ee0ae..105eb1f 100644 --- a/includes/output.php +++ b/includes/output.php @@ -131,8 +131,16 @@ function embm_beer_list_output ($beers) { $output = ''; // Set up new loop data - $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; global $post; + + if ( get_query_var('paged') ) { + $paged = get_query_var('paged'); + } else if ( get_query_var('page') ) { + $paged = get_query_var('page'); + } else { + $paged = 1; + } + $wp_query = new WP_Query(); // The query @@ -188,7 +196,7 @@ function embm_beer_list_output ($beers) { $output .= paginate_links( array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => '?paged=%#%', - 'current' => max( 1, get_query_var('paged') ), + 'current' => max( 1, $paged ), 'total' => $wp_query->max_num_pages ) );