WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Slider was working, now not functional (11 posts)

  1. c.y.design
    Member
    Posted 1 year ago #

    I am using this tutorial http://www.bluelimemedia.com/2012/02/09/build-a-custom-image-slider-on-your-home-page-using-built-in-wordpress-functions/, which uses the Slider by Nathan Searles, and was able to get the slider to work, but all of a sudden it stopped working.

    I've been able to isolate the problem to the two .js files:

    -slides.min.jquery.js
    -jquery.easing.js

    The nav buttons appear, and then immediately disappear. It's static, the slider doesn't switch from post to post.

    The .js files and the script are definitely connected to the post. They just aren't doing what they're supposed to.

    Here is my HTML code:

    <div id="slides">
    <div class="slides_container">
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post();

    $args = array(
    'post_type' => 'attachment',
    'numberposts' => -1,
    'orderby'=> 'menu_order',
    'order' => 'ASC',
    'post_mime_type' => 'image',
    'post_status' => null,
    'post_parent' => $post->ID
    );

    $attachments = get_posts( $args );
    if ( $attachments ) {
    foreach ( $attachments as $attachment ) {
    echo wp_get_attachment_image($attachment->ID , 'full' );
    }
    }
    endwhile; endif; ?>
    </div>
    <img src="<?php bloginfo('template_directory')?>/images/arrow-prev.png" width="24" height="43" alt="Arrow Prev">
    <img src="<?php bloginfo('template_directory')?>/images/arrow-next.png" width="24" height="43" alt="Arrow Next">
    </div>

    The .js files are connected in the header. I was planning on connection through my functions file when I have it working.

    I'm going crazy over this, especially since it was working fine, and I've reverted everything back to exactly how it was when it was working.

    Anyone with a fresh mind have any ideas as to what's happening?

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    You ought to be using some-sort of browser tool that shows you JavaScript errors. Which browser are you using?

  3. c.y.design
    Member
    Posted 1 year ago #

    Here is a link to the slider:

  4. c.y.design
    Member
    Posted 1 year ago #

    Link didn't show: http://familiarsolutions.com/wordpress-3.4.2/wordpress/

    I am using Firefox 17.0.1

  5. c.y.design
    Member
    Posted 1 year ago #

    Update:

    I installed the code on another site and it works perfectly. It's the exact same code.

    I didn't think anything was conflicting with the .js files, but I do have a More link plugin installed which uses .js files and is working fine on the site.

    I have deactivated and deleted that plugin, though, and the slider still wouldn't work.

    Anyone have an idea?

  6. Andrew
    Forum Moderator
    Posted 1 year ago #

    Failed to load resource: the server responded with a status of 404 (Not Found) http://familiarsolutions.com/wordpress-3.4.2/wordpress/ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js?ver=3.4.2

  7. c.y.design
    Member
    Posted 1 year ago #

    Alright, that's fixed. The slider is using the 1.5.1 script, though, and it's still not functional. What do you think is wrong?

  8. Andrew
    Forum Moderator
    Posted 1 year ago #

    Your slider only has 1 image. Is there a way you could add more and then check the functionality?

  9. c.y.design
    Member
    Posted 1 year ago #

    There are 9 published placeholder posts. I tried a custom wp query and nothing changes.

    This is the code:

    <?php if ( have_posts() ) : while ( have_posts() ) : the_post();

    $args = array(
    'post_type' => 'attachment',
    'numberposts' => -1,
    'orderby'=> 'menu_order',
    'order' => 'ASC',
    'post_mime_type' => 'image',
    'post_status' => null,
    'post_parent' => $post->ID
    );

    $attachments = get_posts( $args );
    if ( $attachments ) {
    foreach ( $attachments as $attachment ) {
    echo wp_get_attachment_image($attachment->ID , 'full' );
    }
    }
    endwhile; endif; ?>
    </div>
    <img src="<?php bloginfo('template_directory')?>/images/arrow-prev.png" width="24" height="43" alt="Arrow Prev">
    <img src="<?php bloginfo('template_directory')?>/images/arrow-next.png" width="24" height="43" alt="Arrow Next">
    </div>

    It should be drawing from the 9 since I didn't specify a category. It has the latest post image displaying.

  10. c.y.design
    Member
    Posted 1 year ago #

    Hey guys..

    Anyone have a theory as to what's happening here?

    I have no idea, and pretty much exhausted every possibility I could think of.

  11. c.y.design
    Member
    Posted 1 year ago #

    Final update:

    I inserted an alert towards the end of both javascript files, and did not get either alerts on page load. Both of the files are necessary for the slider to function properly.

    If anyone could solve this issue and explain to me what exactly is going wrong, it would be greatly appreciated and I wouldn't mind paying about $15 for it. I'm not sure if that's much of an incentive, but I need this solved and I've spent way too much time on this.

Topic Closed

This topic has been closed to new replies.

About this Topic