Found the Problem! 😀
Here’s the fix:
– Open \wp-includes\query.php
Search for this Function:
$search_orderby = apply_filters( 'posts_search_orderby', $search_orderby, $this );
if ( $search_orderby )
$orderby = $orderby ? $search_orderby . ', ' . $orderby : $search_orderby;
…and replace it with:
$search_orderby = apply_filters( 'posts_search_orderby', $search_orderby, $this );
if ( $search_orderby )
$orderby = $orderby ;
Also search for this Function:
// Paging
if ( empty($q['nopaging']) && !$this->is_singular ) {
$page = absint($q['paged']);
if ( !$page )
$page = 1;
if ( empty($q['offset']) ) {
$pgstrt = absint( ( $page - 1 ) * $q['posts_per_page'] ) . ', ';
} else { // we're ignoring $page and using 'offset'
$q['offset'] = absint($q['offset']);
$pgstrt = $q['offset'] . ', ';
}
$limits = 'LIMIT ' . $pgstrt . $q['posts_per_page'];
}
…and replace it with:
// Paging
if ( empty($q['nopaging']) && !$this->is_singular ) {
$page = absint($q['paged']);
if ( !$page )
$page = 1;
if ( empty($q['offset']) ) {
$pgstrt = ($page - 1) * $q['posts_per_page'] . ' ROWS FETCH NEXT ';
} else { // we're ignoring $page and using 'offset'
$q['offset'] = absint($q['offset']);
$pgstrt = $q['offset'] . ' ROWS FETCH NEXT ';
}
$limits = 'OFFSET ' . $pgstrt . $q['posts_per_page'] . ' ROWS ONLY';
}
I didn’t write down the Link, where I found this Fix. But its working for me.
you can edit the query in the plugin instead of WordPress, as you will have to migrate your code changes every time WordPress is upgraded to latest version.