Viewing 1 replies (of 1 total)
  • Hi,
    You can use this function (within your theme functions.php file) and tweak it a little to sort element by date descending:

    function bweb_feedzy_date_desc( $a, $b ){
        return strcmp( $a->get_date( 'U' ), $b->get_date( 'U' ) );
    }
    
    function bweb_feedzy_items_date_desc( $items, $feedURL ){
        if( 'http://b-website.com/feed' == $feedURL ) {
                usort( $items, 'bweb_feedzy_date_desc' );
        }
        return $items;
    }
    add_filter( 'feedzy_feed_items', 'bweb_feedzy_items_date_desc', 9, 2 );

    Source: http://b-website.com/feedzy-rss-feeds-available-hooks-examples#comment-816

Viewing 1 replies (of 1 total)
  • The topic ‘Sortorder’ is closed to new replies.