Saltar navegación

[Resuelto] 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 -

Zona horaria del colaborador: Asia/Kolkata (GMT+05:30)

Este tema contiene 15 respuestas, tiene 1 mensaje.

Última actualización por shannonM-4 3 weeks, 3 days ago.

Asistido por: Minesh.

Autor
Mensajes
#2865667

Minesh
Colaborador

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

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

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.
=> enlace oculto

[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