Skip to content

Instantly share code, notes, and snippets.

@LinzardMac
Created April 8, 2013 17:53
Show Gist options
  • Save LinzardMac/5338907 to your computer and use it in GitHub Desktop.
Save LinzardMac/5338907 to your computer and use it in GitHub Desktop.
<?php
$params = array(
'where'=> 'featured'
);
$logos = pods('client_logos');
$logos->find('name ASC', $params);
$total_logos = $logos->getTotalRows();
?>
<div id="featured-clients">
<?php if( $total_logos > 0 ) : ?>
<?php while ( $logos->fetch() ) : ?>
<?php
// set our variables
$name= $logos->field('name');
$permalink= $logos->field('permalink');
$pic1 = $logos->field('logo.guid');
?>
<div id="<?php echo $permalink; ?>">
<img src="<?php echo $pic1; ?>"/>
</div>
<?php
endwhile;
endif;
?>
</div>
@sc0ttkclark
Copy link

$params = array(
    'orderby' => 't.name',
    'where'=> 't.featured = 1'
);

$logos = pods( 'client_logos', $params );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment