This code here is the problem-
$('.slider-menu li').on('click', function(e) {
e.preventDefault();
var slide_index = $('a', this).attr('href').substr(6) - 1;
$homeSlider.flexslider(slide_index);
return false; // IE9 hack
});
In your html, you’re setting your IDs to slide
plus the attachment ID, then telling flexslider to animate to that slide. Except flexslider is expecting a slide position (1st slide, 2nd slide, etc.), not an element ID. You should instead use the index of the clicked li-
$('.slider-menu li').on('click', function(e) {
e.preventDefault();
$homeSlider.flexslider( $(this).index() );
return false; // IE9 hack
});
Also note that flexslider can do all this stuff for you automagically if you create a carousel for the thumbs, and set the carousel asNavFor
for the slider.
Related Posts:
- Jquery Slider for profile template
- Add Infinite Scroll to Ajax Loaded Category Query
- Load comments per post on click with AJAX
- angularjs not displaying all posts
- Get Page content to displayin Bootstrap Modal
- ACF – add a group inside a repeater [closed]
- Fetching posts from wordpress function in ajax
- Using jQuery .after inside loop
- Code to check amount of blog posts and add css
- Pass WP post content to a jQuery plugin (Fancybox)
- WooCommerce – Checkout suddenly stops working [closed]
- How to toggle a div element between two images when click two submit buttons in a wordpress loop?
- How to split a loop into multiple columns
- Is it necessary to reset the query after using get_posts()?
- Using the Loop to show all levels of subpages under a parent page? Halfway there
- Cleanest Way to Select Every Second Element in a Loop?
- Get post by page name or slug
- save_post + insert_post = infinite loop
- Get ID of a page containing secondary loop in content
- ACF Repeater loops and resets – where is the reset_rows() documentation? [closed]
- Display subpages under parent page as a list within a loop
- When to use wp_reset_postdata();
- Why do themes have `while( have_posts() )` in templates like single.php?
- What is best way passing variables to theme templates and using them different places like widgets?
- Apply styling only to first page sticky posts
- Exclude category by slug for for each loop
- Related Posts loop – offset
- Too many nested wp_query loops in this hypothetical query?
- pop-up lighbox with AJAX
- Showing current subcategory
- The main Loop is not starting in a custom blog template page
- WordPress Loop – Style rows of posts differently
- Modify this loop to fit my jQuery slider (slides)
- Generating dynamic Tabs with multiple query post loop
- How do I override part of the main loop in my child theme?
- connect last post with first post
- taxonomy tags 404 to custom post types
- Breaking the loop?
- Only display videos and images in the_content() within loop
- woocommerce stored variable
- Query last updated posts (posts updated in the last 24 hours)
- A smarter way to display multiple loops inside a page template
- Publish Categories for a particular Author on a given Post
- How to print out menu names in the foreach loop?
- How do I style the first two posts of a loop
- Do I need to use The Loop on pages?
- How to get the role id from the role name?
- How do I paginate a get_posts() request inside another page loop (Paginating childpages)
- How to hook into container
- Is wp_reset_postdata() redundant after the main loop?
- While loop with bootstrap [closed]
- How to create a multidimensional array with multiple loops
- Get paged outside of loop?
- How to create custom popup in shop page on every loop products?
- Show scheduled posts in loop (but don’t link to them)?
- How to get a count of all posts in foreach loop and split into fourths
- Getting posts link in WordPress
- Loop through an array inside a class using foreach [closed]
- using wp_get_attachment_image_src in foreach loop
- How to loop through yoast primary categories? [closed]
- How to separate posts loop in to two columns? [duplicate]
- WordPress get post thumbnail url
- query_posts clarification needed
- display post tags on single.php inside loop
- Custom content before post content
- Can’t get the previous and next posts permalink
- Adding first and last classes to three column layout in Bones boilerplate
- Displaying information from custom field on custom post type
- Modifying a Loop to Show More
- Does search.php autofilter The Loop?
- “the_excerpt” in loop just keeps repeating first post?
- wpdb inside foreach loop only returns first result – 2 other similar cases found [closed]
- Add 2 values to post__not_in
- How to loop specific Category menu from archive page?
- How can I pass additional params to a shortcode while in a loop?
- ACF: display custom filed of CPT into the loop
- How to add “NEW” badge on latest posts or published 3 days interval
- Add all category as classes in foreach loop
- Exclude posts from loop by term
- How to avoid appending “null” in Ajax?
- Alternative layout the loop
- Show posts by tags excluding current post
- Adding options to loop
- Limit article to 100 characters. Can’t use the_excerpt…
- Default Template infinite loop of Title
- Adding pagination to WP_Query [duplicate]
- Insert/sticky multiple posts in multiple positions
- This webpage has a redirect loop issue with SSL page
- Buddypress Group Activity Loop Filter activity type [closed]
- Stuck with conflicting loops on page template
- Change the way wordpress outputs images or image galleries
- How can I access ‘key’ and ‘value’ from an array in a for loop?
- How to get current page id and compare it to looped pages inside the same page?
- Show amount of posts created today above loop?
- How to create WordPress loop with combination of 4 and 2 columns twitter-bootstrap?
- posts_nav_link() not working on index.php
- How to add custom HTML markup and classes to the_content()?
- $do_not_duplicate is not working in genesis theme
- Loop displays current page
- Tags outside the loop