Skip to content

Instantly share code, notes, and snippets.

@nicdford
Created March 20, 2018 00:36
Show Gist options
  • Select an option

  • Save nicdford/a19eec2de96209e319ab0eabb8721109 to your computer and use it in GitHub Desktop.

Select an option

Save nicdford/a19eec2de96209e319ab0eabb8721109 to your computer and use it in GitHub Desktop.

Revisions

  1. nicdford created this gist Mar 20, 2018.
    17 changes: 17 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    <?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>';
    }
    }
    ?>