WordPress.org

Ready to get started?Download WordPress

Forums

Groups
[resolved] wp_query list Posts Restricted (3 posts)

  1. raonip
    Member
    Posted 1 year ago #

    Hi!!

    I would like to know how can I list my posts, even the restricted ones in my query.

    I notice that when I restrict one post it not show in my query...

    Thanks!!!!!!!!

    http://wordpress.org/extend/plugins/groups/

  2. itthinx
    Member
    Plugin Author

    Posted 1 year ago #

    Simply using a query:

    global $wpdb;
    $posts = $wpdb->get_results( $wpdb->prepare(
    "SELECT * FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post'"
    ) );
  3. raonip
    Member
    Posted 1 year ago #

    Hi,

    Thanks...but how could I use the default WP_query to do that? Any clue!?

    Thanks!!!!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.