Hi guys,
while waiting for your answer I made some attempts by myself trying to apply the suggestions you put on the wiki here
https://github.com/scribu/wp-posts-to-posts/wiki/Actions-and-filters
I copy the function to the function.php of my theme and then I made a template file named p2p-list-produced_by.php since I create a connection between movies and producers (both custom post types)
Here is the deal:
– if I use the standard shortcode
[p2p_connected type=produced_by mode=ul]
or even
[p2p_connected type=posts_to_pages]
I get the right result displaying the link of the connected producer but I have some problem with the standard layout because I need a simple link list like
<a href="xxx">xxx</a>, <a href="xxx">xxx</a>, <a href="xxx">xxx</a>
instead of
<ul><li><a href="xxx">xxx</a></li></ul>
…
so I try to edit the shortcode to use my template file.
My template file contains just
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
And the shortcode I used was
[p2p_connected type=produced_by mode=list]
But all I get was:
<a href=""></a>
Here comes the nice thing: while I’m using WP-Types and Views to manage custom post types and layouts I tried to use some shortcode in the template file
<a href="<?php echo do_shortcode('[wpv-post-url]'); ?>"><?php echo do_shortcode('[wpv-post-url]'); ?></a>
But the weird thing is that what I get in that case is the right name of the producers with no url!!!
Do you have any suggestion?
Thanks guys for all your great work with this plugin I hope not to bother
regards
Carlo