<?php | |
/** | |
* List Speakers | |
* Used on Schedule page to list speakers connected to session | |
* | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/code/posts-2-posts-list-connections | |
*/ | |
function be_list_speakers() { | |
if( function_exists( 'p2p_list_posts' ) ) { | |
$connected = p2p_type( 'sessions_to_speakers')-> get_connected( $post->ID ); | |
p2p_list_posts( $connected, array( | |
'before_list' => '<p>by ', | |
'after_list' => '</p>', | |
'before_item' => '', | |
'after_item' => ' ', | |
) ); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters