Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #10249

    Hey, i’m using “Caption slider” and what happens now is that the new item added to the slider becomes the last in order, both on backend and the front-end. How can i change the order, that the new added item will become the first one, at least at the front-end? I’ve tried to search in helper-slideshow.php, but no luck. Thanks, Vlad.

    #67402

    Hi!

    Try to replace following code in includes/helper-slideshow.php:

    $this->slides 		= avia_post_meta($this->post_id, 'slideshow');

    with:

    $this->slides 		= avia_post_meta($this->post_id, 'slideshow');
    $this->slides = array_reverse($this->slides);

    Regards,

    Peter

    #67403

    It did the job, thank you Peter for help and the quick response.

    #67404

    Hey Peter, i’ve just noticed an error on the shop page and a single product page: Warning: array_reverse() expects parameter 1 to be array…

    #67405

    Ok, the we need to check if it’s an array first (I thought it’s always an array but hey…). Use following code:

    $this->slides 		= avia_post_meta($this->post_id, 'slideshow');
    if( is_array($this->slides) ){
    $this->slides = array_reverse($this->slides);
    }

    #67406

    Thanks Peter, everything is working.

    #67407

    Hi!

    Great :)

    Best regards,

    Peter

Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘Change the order of featured media items?’ is closed to new replies.