How to change the default feed ordering in Feedzy?

📝 Note: The steps provided in this article are available for Feedzy in a Widget/Shortcode and for the Feed to Post feature.

Sometimes, due to the feed that you are using, the order of the feed posts on your website might be different from the order of the feed items in the XML source.

If such a thing happens, you need to follow the steps below to solve the issue:

1

Copy this code snippet.

/**
 * Modify feed config.
 *
 * @param object $feed SimplePie object.
 * @return void
 */
function feedzy_modify_feed_config_callback( $feed ) {
	if ( ! $feed->order_by_date ) {
		return;
	}
	$feed->enable_order_by_date( false );
}
add_action( 'feedzy_modify_feed_config', 'feedzy_modify_feed_config_callback' );
2

Paste the code into the currently active theme  functions.php file or use Code Snippets.

📝 Note: If you paste the code snippet into the plugin's source file, the changes will be lost when you update the plugin. The same thing may happen when you update the theme, this is why we recommend using a child theme.

3
Save the changes, purge and reset the import, and check the website.

Feed items in the XML file

Feed Posts before the code snippet

Feed Posts after the code snippet

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us