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
(@visuelt)
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!
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
(@visuelt)
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; ?>
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
(@visuelt)
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
And now i am trying your method.
But am I going to get this slide in every page now?