Title: [Plugin: WP Carousel] Scrolls the embedded videos inserted into posts! on mobile
Last modified: August 20, 2016

---

# [Plugin: WP Carousel] Scrolls the embedded videos inserted into posts! on mobile

 *  [valentine2](https://wordpress.org/support/users/valentine2/)
 * (@valentine2)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-wp-carousel-interesting-error-on-mobile/)
 * Hi!
 * I really like this plugin, looks great on [my website.](http://filmhungary.vizkult.hu)
 * I use the **Clear slider theme 1.0.1**, on **Bombax WordPress theme**, and i 
   experienced the follows:
 * When browsing my site with mobile phones (i tested on android, but web testers
   said, the problem is the same on iphone), the carousel plugin while autoscrolling,**
   scrolls the embedded videos inserted into posts** too, not just the thumbnails
   of the posts, and place them to random positions.
 * I didn’t need this, and it looks bad. I have uploaded [a picture](http://img259.imageshack.us/img259/6906/screenshot1332664474599.png)
   to show that to you.
 * Maybe i should disable the desktop-view on mobile phones and enable just the 
   mobile-view, but i want to keep the possibility for mobile browsing users to 
   see my site at its best.
 * What can i do to dissolve this bug? Please help me! Thanks!
 * [http://wordpress.org/extend/plugins/wp-carousel/](http://wordpress.org/extend/plugins/wp-carousel/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [sumolari](https://wordpress.org/support/users/sumolari/)
 * (@sumolari)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-wp-carousel-interesting-error-on-mobile/#post-2649048)
 * I’m not sure about that issue. I haven’t tried WP Carousel on mobile devices.
   Well, I have, but not having videos in the posts.
 * I think the easiest solution is disabling autoscrolling when the user is browser
   with a mobile device.
 * How to do this? Let’s assume you have a function named is_mobile() that returns
   true when the user is using a mobile phone and false when he is not.
 * Open wp-carousel.php and locate the following code (near line 1267):
 *     ```
       if (!isset($value['AUTOSLIDE_POSTS']))
       			{
       				$value['AUTOSLIDE_POSTS'] = 0;
       			}
       			else
       			{
       				$value['AUTOSLIDE_POSTS'] = (int) $value['AUTOSLIDE_POSTS'];
       			}
       ```
   
 * When $value[‘AUTOSLIDE_POSTS’] is 0, autosliding is disabled, so we will have
   to modify that piece of code to take into account that independently the value
   set in config, if the user is using a mobile phone, it will be 0.
 * That is:
 *     ```
       if (!isset($value['AUTOSLIDE_POSTS']) || is_mobile())
       			{
       				$value['AUTOSLIDE_POSTS'] = 0;
       			}
       			else
       			{
       				$value['AUTOSLIDE_POSTS'] = (int) $value['AUTOSLIDE_POSTS'];
       			}
       ```
   
 * How to define function is_mobile()? Well, there different ways. For instace, 
   [this post](http://www.wprecipes.com/how-to-detect-mobile-visitors-on-your-wordpress-blog)
   shows one of them.
 * A different solution is hiding WP Carousel when the user uses a mobile phone,
   but if the problem is solved disabling autosliding, I think this is not needed.
 * In any case, I’ve plans to rewrite WP Carousel, but it will take a lot of time,
   so use one of this solutions instead of waiting for a new release.
 * Thanks for using WP Carousel!
 *  Thread Starter [valentine2](https://wordpress.org/support/users/valentine2/)
 * (@valentine2)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-wp-carousel-interesting-error-on-mobile/#post-2649049)
 * I’m using wptouch for mobile content.
 * Can you figure out a method for this sitation?
 *  Plugin Author [sumolari](https://wordpress.org/support/users/sumolari/)
 * (@sumolari)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-wp-carousel-interesting-error-on-mobile/#post-2649050)
 * I think it’s bnc_wptouch_is_mobile(), but I’m not sure. You should ask the developers
   of WPTouch for this.
 * **Edit:** The code of that function is:
 *     ```
       function bnc_wptouch_is_mobile() {
       	global $wptouch_plugin;
   
       	return ( $wptouch_plugin->applemobile && $wptouch_plugin->desired_view == 'mobile' );
       }
       ```
   
 * That function returns if the user is in mobile interface, so you should create
   a new function, is_mobile() which detects just if the user is using a mobile,
   no matter he is using the mobile version of the site or the regular one, something
   like:
 *     ```
       function is_mobile() {
       	global $wptouch_plugin;
   
       	return ( $wptouch_plugin->applemobile);
       }
       ```
   
 * I think it should work, but I haven’t tried it.
 *  Thread Starter [valentine2](https://wordpress.org/support/users/valentine2/)
 * (@valentine2)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-wp-carousel-interesting-error-on-mobile/#post-2649052)
 * Sorry, i’cant follow these steps, i will disable desktop mode on mobile, until
   a proper update of this plugin. I hoped that the solution will be simplier. 😀
 * Thanks for your help and the plugin!
 *  [vivek.khanduri12](https://wordpress.org/support/users/vivekkhanduri12/)
 * (@vivekkhanduri12)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-wp-carousel-interesting-error-on-mobile/#post-2649419)
 * I am also using theme Bombax but I can’t able to put ads in between posts, can
   anybody please help me how to put ads in between posts in bombax theme

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘[Plugin: WP Carousel] Scrolls the embedded videos inserted into posts!
on mobile’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-carousel.svg)
 * [WP Carousel](https://wordpress.org/plugins/wp-carousel/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-carousel/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-carousel/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-carousel/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-carousel/reviews/)

## Tags

 * [embed](https://wordpress.org/support/topic-tag/embed/)
 * [mobile](https://wordpress.org/support/topic-tag/mobile/)
 * [video](https://wordpress.org/support/topic-tag/video/)

 * 5 replies
 * 3 participants
 * Last reply from: [vivek.khanduri12](https://wordpress.org/support/users/vivekkhanduri12/)
 * Last activity: [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-wp-carousel-interesting-error-on-mobile/#post-2649419)
 * Status: not resolved