Support » Plugin: Posts 2 Posts » [Plugin: Posts 2 Posts] Simple list output mode

  • Resolved carletto0282


    Hi guys,

    what if I’d like to get a simple link list?

    I mean a list of the connected post not formatted in an ordered/unordered list but just a list of comma-separated links?

    I thought it’s something about the “mode” attribute in the shortcode but I can’t find any detailed information about it on the plugin’s home page.

    Can you help me?


Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi guys,

    while waiting for your answer I made some attempts by myself trying to apply the suggestions you put on the wiki here

    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


    Plugin Author scribu


    In the development version (1.4.3-alpha), you can do this:

    [p2p_connected type=produced_by mode=inline]

    Great, I will check it asap

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Posts 2 Posts] Simple list output mode’ is closed to new replies.