Title: Flexislide gone wrong!
Last modified: August 21, 2016

---

# Flexislide gone wrong!

 *  [Kar](https://wordpress.org/support/users/visuelt/)
 * (@visuelt)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/flexislide-gone-wrong/)
 * Hello, i hva tryed to put in a flexislide in my theme. and it appears like this:
   wp.visuelt.as
 * What am i doing wrong? and the $args dosen’t seem to work?
 * please help me out!

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

 *  [Dave Naylor](https://wordpress.org/support/users/wpranger/)
 * (@wpranger)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/flexislide-gone-wrong/#post-4725724)
 * The link to the flexislider CSS file is wrong. It should be:
 * `http://wp.visuelt.as/wp-content/themes/Visuelt2014/slider/css/flexslider.css`
 *  Thread Starter [Kar](https://wordpress.org/support/users/visuelt/)
 * (@visuelt)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/flexislide-gone-wrong/#post-4725727)
 * ah in functions. I have fixed it now, but now it is just a line that is all, 
   no pictures? (sorry pretty new to this) Thanks for the help!
 *  [Dave Naylor](https://wordpress.org/support/users/wpranger/)
 * (@wpranger)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/flexislide-gone-wrong/#post-4725982)
 * Did you follow the flexislider instructions and add this to your `<head>`:
 *     ```
       <script type="text/javascript" charset="utf-8">
       (function($) {
           $(window).load(function() {
               $('.flexslider').flexslider({
       	            animation: 'slide',
       		    controlsContainer: '.flex-container'
       	    });
           });
       })(jQuery)
       </script>
       ```
   
 *  Thread Starter [Kar](https://wordpress.org/support/users/visuelt/)
 * (@visuelt)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/flexislide-gone-wrong/#post-4725983)
 * I added this to the head.php
 *     ```
       <div id="main">
   
       				<?php if ( is_front_page() ) {
       						get_template_part( 'banner', 'home' );
       				} ?>
       ```
   
 * And this to the banner-home.php
 *     ```
       <?php
       $args = array(
       		'post_type'				=> 'slides',
       		'orderby'				=> 'menu_order',
       		'posts_per_page'	=> -1
       );
   
       $slides = new WP_Query( $args );
   
       if ( $slides->have_posts() ) : ?>
       	<div class="flexslider">
       	<ul class="slides">
       	<?php while ( $slides->have_posts() ) : $slides->the_post(); ?>
       			<li>
       				<?php the_post_thumbnail( 'slides' ); ?>
       			</li>
       		<?php endwhile; ?>
       		</ul>
       		</div>
       <?php endif; ?>
       ```
   
 *  [Dave Naylor](https://wordpress.org/support/users/wpranger/)
 * (@wpranger)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/flexislide-gone-wrong/#post-4725984)
 * Looking at the source of your site, you’ve added the code snippet I posted below
   the slides, not in your header. Strip it out and let’s do this properly. Put 
   this in your theme’s functions.php:
 *     ```
       function my_slider() { ?>
       <script type="text/javascript" charset="utf-8">
        (function($) {
           $(window).load(function() {
               $('.flexslider').flexslider({
                       animation: 'slide',
       		    controlsContainer: '.flex-container'
       	    });
           });
       })(jQuery)
       </script>
       <?php }
       add_action('wp_head', 'my_slider');
       ```
   
 *  Thread Starter [Kar](https://wordpress.org/support/users/visuelt/)
 * (@visuelt)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/flexislide-gone-wrong/#post-4725985)
 * Now it is showing but it is underneath each other.
 * I just followed this one the first time: [http://www.youtube.com/watch?v=voOQDohL4Pc](http://www.youtube.com/watch?v=voOQDohL4Pc)
 * And now i am trying your method.
    But am I going to get this slide in every page
   now?

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

The topic ‘Flexislide gone wrong!’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 2 participants
 * Last reply from: [Kar](https://wordpress.org/support/users/visuelt/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/flexislide-gone-wrong/#post-4725985)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
