I believe that the 1.2 update of the plugin has introduced a difference in the output generated by the
p2p_list_postsutility function that is described here:
The default usage of the
p2p_list_postsfunction is not affected, it still outputs this:
<ul> <li> <a href="HYPERLINK">TITLE</a> </li> </ul>
The issue appears when I use a custom template with this syntax:
p2p_list_posts( $post->connected, array( 'template' => 'my-custom-template.php' ) );
Instead of replacing the default output with ‘my-custom-template.php’, it appends the default ouput after the custom part.
So if ‘my-custom-template.php’ would contain only the word ‘TEST’, we would see this output:
<ul> <li> TEST <a href="LINK">TITLE</a> </li> </ul>
It looks like there is no way to get rid of that unwanted default part. Did the “template” feature become unsupported? Should I avoid using
p2p_list_posts, and rather create a loop instead?
- The topic ‘[Plugin: Posts 2 Posts] 1.2 changes behavior of p2p_list_posts (with custom template)’ is closed to new replies.