Skip to content

Instantly share code, notes, and snippets.

@nicdford
Created March 20, 2018 00:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicdford/a19eec2de96209e319ab0eabb8721109 to your computer and use it in GitHub Desktop.
Save nicdford/a19eec2de96209e319ab0eabb8721109 to your computer and use it in GitHub Desktop.
Custom Simple Relationship where param list pods values
<?php
$params = array(
'limit' => 3,
'where' => "source.meta_value = 'google'" // Relationship (Custom Simple)
);
$pods = pods( 'testimony', $params );
if ( !empty( $pods ) ) {
while ($pods->fetch()){
echo '<h2>' . $pods->display('post_title') . '</h2>';
echo '<p>' . $pods->display('testimony_date') . '</p>';
echo '<p>' . $pods->display('source') . '</p>';
echo '<hr>';
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment