Posts 2 Posts
[resolved] How to use pagination on connected posts (3 posts)

  1. bjdj
    Posted 5 years ago #

    If it is possible, how should I use pagination with the Posts 2 Posts plugin. I guess it should be possible with the p2p_get_connected function, as it is possible to return a WP_Query object. But I don't know how to go from there.

    Thanks in advance.


  2. scribu
    Plugin Author

    Posted 5 years ago #

    In the development version (0.4-alpha3), you can do this:

    query_posts( array(
      'post_type' => 'foo',
      'connected_from' => 123 // a post id
    ) );

    So paging will work as usual.

    PS: Other vars are 'connected_to' and 'connected'.

  3. bjdj
    Posted 5 years ago #

    Thank you scribu for adding this functionality to your great plugin. It really takes WordPress one step up as a CMS.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Posts 2 Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic