Title: Code optimisation (bxSlider)
Last modified: February 6, 2018

---

# Code optimisation (bxSlider)

 *  Resolved [beunoit](https://wordpress.org/support/users/beunoit/)
 * (@beunoit)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/code-optimisation-bxslider/)
 * Hi !
    Great plugin wich is doing exactly what I need. The only pb I have is :
   when I select a listing display (not a slider), the bxSlider script and sltylesheet
   are still inserted in the page. It make my page less optimised… I can make a 
   patch, but I think it could be natively implemented, don’t you ? Regards, Beunoit

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

 *  Plugin Author [Fahad Mahmood](https://wordpress.org/support/users/fahadmahmood/)
 * (@fahadmahmood)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/code-optimisation-bxslider/#post-9942657)
 * Beunoit,
 * You can make changes and send it to me, i will check and update the files in 
   next version. Would that work?
 * Fahad
 *  Thread Starter [beunoit](https://wordpress.org/support/users/beunoit/)
 * (@beunoit)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/code-optimisation-bxslider/#post-9943039)
 * For my need, I just put this on line 125 and remove the two files from index.
   php :
 *     ```
       $html = "";
               if($this->list_type =='slider') {
                   wp_enqueue_script(
                       'rfw-slider-script',
                       plugins_url('js/jquery.bxslider.js', __FILE__),
                       array( 'jquery' ),
                       date('Ymhi'),
                       true
                   );
                   wp_enqueue_style( 'rfw-slider-style',  plugins_url('css/jquery.bxslider.css', (__FILE__)), array(), date('Ymhi'));
                   //pree($this->img_size);
                   $html.= "<script type=\"text/javascript\" language=\"javascript\">jQuery(document).ready(function($){	
       						$('#".$args['widget_id']." .rfw_dock.rfw_slider').bxSlider({
       							  auto: true,
       							  adaptiveHeight: true,
       							  pager: true,
       							  controls: false,
       							  infiniteLoop: true,
       							  speed: $speed,
       							  mode: 'horizontal',
       							  pause: 10000,
       							  ticker: false,
       							  pagerType: 'full',
       							  randomStart: true,
       							  hideControlOnEnd: true,
       							  easing: 'linear',
       							  captions: false,
       							  video: true,
       							  responsive: true,
       							  useCSS: true,
       							  preloadImages: 'visible',
       							  touchEnabled: true
       						});
       					});
       				</script>";
               }
   
       $html.= '<aside id="'.$args['widget_id'].'" class="rfw-class '.$rfw_style.'">';
       ```
   
 * Maybe you can do it better ! 🙂
 *  Plugin Author [Fahad Mahmood](https://wordpress.org/support/users/fahadmahmood/)
 * (@fahadmahmood)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/code-optimisation-bxslider/#post-9944833)
 * I have just updated the version and improved as you said. Have a look here please.
 * [https://wordpress.org/plugins/rss-feed-widget/#developers](https://wordpress.org/plugins/rss-feed-widget/#developers)
 *  Thread Starter [beunoit](https://wordpress.org/support/users/beunoit/)
 * (@beunoit)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/code-optimisation-bxslider/#post-9946923)
 * Great ! Thank you ! 🙂

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

The topic ‘Code optimisation (bxSlider)’ is closed to new replies.

 * ![](https://ps.w.org/rss-feed-widget/assets/icon-256x256.gif?rev=2286803)
 * [RSS Feed Widget](https://wordpress.org/plugins/rss-feed-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/rss-feed-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/rss-feed-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/rss-feed-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/rss-feed-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/rss-feed-widget/reviews/)

## Tags

 * [bxslider](https://wordpress.org/support/topic-tag/bxslider/)
 * [optimisation](https://wordpress.org/support/topic-tag/optimisation/)

 * 4 replies
 * 2 participants
 * Last reply from: [beunoit](https://wordpress.org/support/users/beunoit/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/code-optimisation-bxslider/#post-9946923)
 * Status: resolved