Created
October 30, 2013 00:54
-
-
Save jessijean/7225441 to your computer and use it in GitHub Desktop.
How to page a custom query in wordpress
From http://wordpress.stackexchange.com/questions/57884/pagination-is-not-working-wp-query-custom-fields-values
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global $paged; | |
$temp = $wp_query; | |
$wp_query = null; | |
$wp_query = new WP_Query( array( 'meta_key' => 'wpcf-gender', 'meta_value' => '1', 'meta_compare' => '==', 'post_type' => 'profile','posts_per_page' => 2, 'paged' => $paged ) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment