Slider not following order set in slides

Home Support Business Point Slider not following order set in slides

Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #11830
    Anonymous
    Inactive

    Hi,

    Setting order of slides does not work correctly. They appear to be somewhat random, not in set order nor in post id order.

    Thanks in advance for fixing this 😉

    Adam

    #11931
    nirav
    Keymaster

    Hello Amikron,

    The issue you are facing is already solved in our business point 2.1.2 version.
    Can you please make sure you have installed version theme.
    The issue will be solved you update the theme.

    Please feel free to let us know if you have any further queries.

    Thank you.

    #11949
    Anonymous
    Inactive

    Hi again,

    I’m afraid I had the latest version allready installed, when I submitted this post. I have fixed it myself by adding menu_order as ‘id’ to $output in helpers.php and then sorting over it, but I wouldn’t like to change this code after every update of the theme ;-).

    Best regards,
    Adam

    #15726
    Anonymous
    Inactive

    Same problem here.

    #15742
    Anonymous
    Inactive

    I’ve fixed this on my own. In include/helpers.php in function business_point_get_slider_details you have to add order to output array and then sort the array over it.

    I’m posting whole fragment, so you can easily find changes:

    $posts = get_posts( $query_args );

    if ( ! empty( $posts ) ) {
    $p_count = 1;
    foreach ( $posts as $post ) {
    if ( has_post_thumbnail( $post->ID ) ) {
    $image_array = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), ‘full’ );
    $output[ $p_count ][‘image_url’] = $image_array[0];
    $output[ $p_count ][‘title’] = $post->post_title;
    $output[ $p_count ][‘url’] = get_permalink( $post->ID );
    $output[ $p_count ][‘excerpt’] = business_point_get_the_excerpt( absint($slider_excerpt_length), $post );
    $output[ $p_count ][‘id’] = $post->menu_order; //store order in output array

    $p_count++;
    }
    }
    // sort over it
    foreach ($output as $key => $row)
    {
    $slider_pages[$key] = $row[‘id’];
    }
    array_multisort($slider_pages, SORT_ASC, $output);
    }

    return $output;

    #17153
    Anonymous
    Inactive

    I think I need to change my website theme with Prodesign because it is have too much extra features that’s may help me to get better design. You can see my pet dog website here dogsfreedom.com

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.