crp_query_posts_orderby
Modify the posts_orderby clause.
Type: filter
Since: 4.3.0
Source: includes/class-crp-core-query.php line 1008
Parameters
| Type | Name | Description |
|---|---|---|
string | $orderby | The ORDER BY clause of the query. |
\WP_Query|\CRP_Query | $query | The WP_Query or CRP_Query instance. |
Usage
add_filter( 'crp_query_posts_orderby', function($orderby, $query) {
// ...
return $orderby;
} );