Title: [Plugin: Posts 2 Posts] templates for p2p_list_posts
Last modified: August 20, 2016

---

# [Plugin: Posts 2 Posts] templates for p2p_list_posts

 *  Resolved [Manuel Schmalstieg](https://wordpress.org/support/users/targz-1/)
 * (@targz-1)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-templates-for-p2p_list_posts/)
 * Congratulations for this awesome plugin. It’s already revolutionizing my WordPress-
   as-a-CMS workflow.
 * I would like to ask for some information regarding the “templates” that we can
   supposedly define for the `p2p_list_posts()` function.
 * A reference to such templates is included in the function’s code, in /core/api.
   php … but there is no info yet in the official wiki: [https://github.com/scribu/wp-posts-to-posts/wiki/Using-p2p_list_posts%28%29](https://github.com/scribu/wp-posts-to-posts/wiki/Using-p2p_list_posts%28%29)
 * So I guess this feature will evolve with coming updates?
 * My practical use case: at some places of my theme, I want to output a list of
   connected posts _without_ the hyperlink linking to the post. Just the title. 
   While I can define “before” and “after” markup, there seems to be no easy way
   to disable the hyperlink.
 * For now I will simply modify the function in /core/api.php, or create a similar
   function. But it would be good to know more about the use of those templates.
 * Another thing: I spent some time trying to apply the code given in “Looping The
   Loop” inside multiple loops built with `WP_Query`, which wasn’t giving me the
   expected results. Finally I understood that I should use `query_posts` for that,
   and all worked fine.
    The “Looping The Loop” article might include a little hint,
   for the noobs among us 😉
 * Thanks again for the great work!
    PS: I created German language files, will send
   them your way.
 * [http://wordpress.org/extend/plugins/posts-to-posts/](http://wordpress.org/extend/plugins/posts-to-posts/)

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

 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-templates-for-p2p_list_posts/#post-2473471)
 * `p2p_list_posts()` is just a utility to avoid using a normal Loop. I’m not even
   sure if I should keep it around.
 * As for the ‘template’ parameter, you would use it like this:
 *     ```
       p2p_list_posts( $connected, array( 'template' => 'some-template.php' ) );
       ```
   
 * And in your theme, you would have to have a file called `some-template.php`.
 *  Thread Starter [Manuel Schmalstieg](https://wordpress.org/support/users/targz-1/)
 * (@targz-1)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-templates-for-p2p_list_posts/#post-2473627)
 * Thanks Scribu for the splendid x-mas holiday support.
    I will give the template
   parameter a try.

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

The topic ‘[Plugin: Posts 2 Posts] templates for p2p_list_posts’ is closed to new
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/posts-to-posts_7a8e9d.svg)
 * [Posts 2 Posts](https://wordpress.org/plugins/posts-to-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/posts-to-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/posts-to-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/posts-to-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/posts-to-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/posts-to-posts/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Manuel Schmalstieg](https://wordpress.org/support/users/targz-1/)
 * Last activity: [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-templates-for-p2p_list_posts/#post-2473627)
 * Status: resolved