Title: biga85's Replies | WordPress.org

---

# biga85

  [  ](https://wordpress.org/support/users/biga85/)

 *   [Profile](https://wordpress.org/support/users/biga85/)
 *   [Topics Started](https://wordpress.org/support/users/biga85/topics/)
 *   [Replies Created](https://wordpress.org/support/users/biga85/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/biga85/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/biga85/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/biga85/engagements/)
 *   [Favorites](https://wordpress.org/support/users/biga85/favorites/)

 Search replies:

## Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP-Property - WordPress Powered Real Estate and Property Management] "Private" properties are not showing up for logged in admin](https://wordpress.org/support/topic/private-properties-are-not-showing-up-for-logged-in-admin/)
 *  Thread Starter [biga85](https://wordpress.org/support/users/biga85/)
 * (@biga85)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/private-properties-are-not-showing-up-for-logged-in-admin/#post-7242826)
 * I found a solution.
    In plugins file “class_core.php” under function “parse_request(
   $query )” at the end before line “return $query;” need to write:
 *     ```
       if (is_user_logged_in()){
       $query->query_vars[ 'post_status' ] = 'private, publish';
       }
       ```
   
 * Off course, probably it is not enough to have only this code. I have many places
   in plugin where I changed SQL from post_type -> “publish” to post_type -> “pubish,
   private”…
 * But now I can sleep better 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP-Property - WordPress Powered Real Estate and Property Management] "Private" properties are not showing up for logged in admin](https://wordpress.org/support/topic/private-properties-are-not-showing-up-for-logged-in-admin/)
 *  Thread Starter [biga85](https://wordpress.org/support/users/biga85/)
 * (@biga85)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/private-properties-are-not-showing-up-for-logged-in-admin/#post-7242795)
 * I added code that it can be publish or private in parse_request() function and
   SQL looks good, but still page not found. Then I see another SQL in debuging 
   with only **publish** status:
 *     ```
       SELECT ID
       FROM wp_posts
       WHERE post_name LIKE '2-kamb-naujakiemio-g-47-kv-26000-eur%'
       AND post_type = 'property'
       AND post_status = 'publish'
       ```
   
 * under:
    redirect_guess_404_permalink() wp-includes/canonical.php:553 redirect_canonical()
   wp-includes/canonical.php:146 do_action(‘template_redirect’) wp-includes/plugin.
   php:503
 * before that it was SQL without any status:
 *     ```
       SELECT *
       FROM wp_posts
       WHERE post_name = '2-kamb-naujakiemio-g-47-kv-26000-eur'
       AND post_type = 'property'
       LIMIT 0, 1
       ```
   
 * WPP_F::posts_results()
    wp-content/plugins/wp-property/lib/class_functions.php:
   1010
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP-Property - WordPress Powered Real Estate and Property Management] "Private" properties are not showing up for logged in admin](https://wordpress.org/support/topic/private-properties-are-not-showing-up-for-logged-in-admin/)
 *  Thread Starter [biga85](https://wordpress.org/support/users/biga85/)
 * (@biga85)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/private-properties-are-not-showing-up-for-logged-in-admin/#post-7242794)
 * Yes, this only happens to private properties, but NOT to posts and pages.
    Permalinks
   is ok – “postname”.
 * I tried to debug and I think that the problem is on function parse_request in
   class_core.php. There is a line ~410 where checking “!is_admin()” and then “hack”
   to open right page template goes. There is provided info for query, but there
   is not provided post status for query and later wp->query thinks it should be
   public, at least SQL in debuging looks like this:
 *     ```
       SELECT wp_posts.*
       FROM wp_posts
       WHERE 1=1
       AND wp_posts.post_name = '2-kamb-naujakiemio-g-47-kv-26000-eur'
       AND wp_posts.post_type = 'page'
       AND (<strong>(wp_posts.post_status = 'publish')</strong>)
       ORDER BY wp_posts.post_date DESC
       ```
   
 * under:
    WP_Query->get_posts() wp-includes/query.php:3499 – WP_Query->query() 
   wp-includes/query.php:3874 get_posts() wp-includes/post.php:1903 **WPP_Core->
   parse_request() wp-content/plugins/wp-property/lib/class_core.php:436 do_action_ref_array(‘
   parse_request’) wp-includes/plugin.php:579 WP->parse_request() wp-includes/class-
   wp.php:339 WP->main() wp-includes/class-wp.php:620 wp() wp-includes/functions.
   php:886

Viewing 3 replies - 1 through 3 (of 3 total)