WordPress.org

Ready to get started?Download WordPress

Forums

Posts 2 Posts
WP_Query (2 posts)

  1. Cristiano
    Member
    Posted 3 years ago #

    Hi friends,

    This is my query:

    $the_query = new WP_Query( array(
      	'post_type' => 'texto',
      	'connected' => $post->ID,
    ) );

    How could I use the default criteria like:

    $the_query = new WP_Query('showposts=1&orderby=post_date&order=desc');

    I mean, how to query connected posts limiting the "showposts=1", for exemple?

    Thanks!!!

  2. scribu
    Member
    Plugin Author

    Posted 3 years ago #

    Erm... like this:

    $the_query = new WP_Query( array(
    	'post_type' => 'texto',
    	'connected' => $post->ID,
     	'showposts' => 1
    ) );

    Or are you asking something else?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic