Hi All,
I’ve got a homepage that I want to display 4 random posts (from our members posts) in a carousel of about 80 cards. I have the styles set the way I want them with some functions code, but when I tick the carousel box and select 4 posts to show and 100 to scroll, the card are blank (though I can see the dots at the bottom representing the carousel). What I am doing wrong? I am sure it’s user error.
Here’s my homepage with the carousel box ticked.
Here’s what it looks like without carousel— I want it to look just like this, but with carousel.
Here’s the functions code I have for reference:
` if ( 2347 == $settings[ ‘list_id’ ] ) {
$args = array(
‘orderby’ => ‘rand’,
‘posts_per_page’ => 1,
);
$query = new WP_Query( $args );
$image_profile = get_field(‘profile_image’);
$size = ‘large’;
echo ‘‘;
echo wp_get_attachment_image( $image_profile, $size );
echo ‘‘;
echo ‘‘;
the_title( ‘<h2 class=”meta-username”>’, ‘</h2>’);
echo ‘‘;
$values = get_field(‘things_you_do’);
if(is_array($values)){
if( count($values)){
echo ‘<div class=”members-things”>’;
foreach($values as $k=>$value){
if($k) echo ‘, ‘;
echo $value;
}
echo ‘</div>’;
}
}
}