WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. bjdj
    Member
    Posted 3 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.

    http://wordpress.org/extend/plugins/posts-to-posts/

  2. scribu
    Member
    Plugin Author

    Posted 3 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
    Member
    Posted 3 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

About this Topic