表示単位を画面サイズで変更する方法が知りたい。 | WordPress.org

[ad_1]

こんにちは

xo_slider_script_parameter フィルターフックを使用するのはどうでしょうか?

例:

function my_xo_slider_script_parameter( $params, $slide, $key ) {
	if ( 1234 == $slide->id ) {
		$params['slidesPerView'] = 1;
		$params['spaceBetween'] = 0;
		$params['breakpoints'] = [
			// 480px 以上
			'480' => [
				'slidesPerView' => 1.4,
				'spaceBetween' => 5,
			],
		];
	}
	return $params;
}
add_filter( 'xo_slider_script_parameter', 'my_xo_slider_script_parameter', 10, 3 );

※ コード中の1234はスライダー ID です。

ishitaka様

思うように表示されました。ありがとうございました。

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer