mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- fixed posts query in the User Profile;
This commit is contained in:
@@ -29,11 +29,12 @@ if ( ! class_exists( 'um\core\User_posts' ) ) {
|
||||
*/
|
||||
function add_posts() {
|
||||
$args = array(
|
||||
'post_type' => 'post',
|
||||
'posts_per_page' => 10,
|
||||
'offset' => 0,
|
||||
'author' => um_get_requested_user(),
|
||||
'post_status' => array( 'publish' )
|
||||
'post_type' => 'post',
|
||||
'posts_per_page' => 10,
|
||||
'offset' => 0,
|
||||
'author' => um_get_requested_user(),
|
||||
'post_status' => array( 'publish' ),
|
||||
'um_main_query' => true,
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -107,11 +108,12 @@ if ( ! class_exists( 'um\core\User_posts' ) ) {
|
||||
$page = ! empty( $_POST['page'] ) ? absint( $_POST['page'] ) : 0;
|
||||
|
||||
$args = array(
|
||||
'post_type' => 'post',
|
||||
'posts_per_page' => 10,
|
||||
'offset' => ( $page - 1 ) * 10,
|
||||
'author' => $author,
|
||||
'post_status' => array( 'publish' )
|
||||
'post_type' => 'post',
|
||||
'posts_per_page' => 10,
|
||||
'offset' => ( $page - 1 ) * 10,
|
||||
'author' => $author,
|
||||
'post_status' => array( 'publish' ),
|
||||
'um_main_query' => true,
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user