Skip to content

Instantly share code, notes, and snippets.

@axeldevo
Created March 18, 2014 18:01
Show Gist options
  • Save axeldevo/9625734 to your computer and use it in GitHub Desktop.
Save axeldevo/9625734 to your computer and use it in GitHub Desktop.
bi-directional relationship URL 2
<?php
$params = array(
'where' => "investor_companies.ID = " . get_the_ID(),
'limit' => -1 // Return all rows
);
$investors = pods( 'investor', $params );
if ( 0 < $investors->total() ) {
while ( $investors->fetch() ) {
$elements[] = '<a href="' . $investors->display( 'permalink' ) . '">' . $investors->display( 'investor_name' ) .'</a>';
} echo implode(', ', $elements);}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment