33 lines
800 B
PHP
33 lines
800 B
PHP
<?php
|
|
|
|
/**
|
|
* Client grid template.
|
|
*
|
|
* @package ThemeStarter
|
|
*/
|
|
|
|
?>
|
|
|
|
|
|
<ul class="grid grid-cols-3 md:grid-cols-6 2xl:grid-cols-12 gap-4 items-center justify-items-center filter grayscale">
|
|
<?php
|
|
$args = array(
|
|
'post_type' => 'clients',
|
|
'posts_per_page' => 12,
|
|
'orderby' => 'date',
|
|
'order' => 'ASC',
|
|
);
|
|
$query = new WP_Query($args);
|
|
if ($query->have_posts()) {
|
|
while ($query->have_posts()) {
|
|
$query->the_post(); ?>
|
|
<li>
|
|
<a target="_blank" href="<?= get_field('client_website') ?>"><img src="<?= get_field("client_logo"); ?>" alt="<?= the_title() ?> logo"></a>
|
|
</li>
|
|
<?php }
|
|
wp_reset_postdata();
|
|
} else {
|
|
// No posts found
|
|
}
|
|
?>
|
|
</ul>
|