Skip Navigation

[Resolved] Hiding navigation arrows on slideshow

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 15 replies, has 1 voice.

Last updated by shannonM-4 3 days, 19 hours ago.

Assisted by: Minesh.

Author
Posts
#2865667

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I've created the following code snippet and added the "Code Snippet" plugin:
- hidden link

function toolset_homepage_slideshow_count_shortcode() {
	global $post;

	if ( ! $post instanceof WP_Post ) {
		return 0;
	}
	
	

	$values = get_post_meta(
		$post->ID,
		'wpcf-homepage-slideshow',
		false // Return all values for the repeating field.
	);
	

	return   count( $values);
}
add_shortcode('toolset_homepage_slideshow_count','toolset_homepage_slideshow_count_shortcode');

The above shortcode will return the total number of images you uploaded for the repeating field and then I've added the following conditional shortcode within the following view's "Loop Editor" section.
=> hidden link

[wpv-conditional if="( '[toolset_homepage_slideshow_count]' eq '1' )"]
                <style>
                  .glide__arrows { display:none; }
                </style>
		[/wpv-conditional]

Can you please confirm it works as expected now.

#2865675

Minesh,

This work beautifully. Thank you!

Saul