Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #654571

    Hello!
    How can I decide the image order on the Feature Image Slider?
    I’m using a Feature Image Slider which contents are different categories I have on the page. But I need that one specific category ALWAYS appear in the first slide of the Slider.
    I couldn’t find the right help on the older topics .

    Thanks in advance!
    (sorry for my english)

    Andrea

    #655363

    Please, ¿Can anybody help me? :/
    Thanks!

    #655965

    Hi,

    We are very sorry for the delay.

    You cannot alter the order of the items via category but you can do it using custom fields. Add this in the functions.php file:

    add_filter('avia_feature_image_slider_query', 'avia_feature_image_slider_query_mod', 10, 1);
    function avia_feature_image_slider_query_mod($query) {
    	$query['meta_key'] = 'featured_slider_order';
    	$query['orderby'] = 'meta_value_num';
    	$query['order'] = 'DESC';
    	return $query;
    }
    

    Edit the posts, add a custom field called “featured_slider_order” then add a numeric value (1, 2, 3 or 4 etc) to it. Note that you have to add the custom field in every posts that is included in the slider.

    Best regards,
    Ismael

    #1462775

    Hi Ismael,
    I have the same problem here!
    I added the code but after that I don’t understand your answer anymore.
    Where should I add the custom field? Is it possible to hold one Image at position 1 and after that sort after date DESC?
    Thanks in advance!

    #1462818

    Hi,

    You have to edit the posts and create a custom field called “featured_slider_order”. Unfortunately, you cannot set a sticky post to the slider. If you require more assistance, please don’t hesitate to open another thread.

    Best regards,
    Ismael

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Image order on the Feature Image Slider’ is closed to new replies.