Answer the question
In order to leave comments, you need to log in
Wordpress: how to make "on approval" entries always on top?
Tell me how you can do so that the records that are under approval are always higher than the rest of the records.
I dug into the code for half a day, but I couldn’t do it, plugins also don’t seem to fit my problem.
Answer the question
In order to leave comments, you need to log in
All post requests can be edited on the hook pre_get_posts
. For admin requests, it looks something like this:
add_action( 'pre_get_posts', 'admin_pre_get_posts', 1 );
function admin_pre_get_posts( $query ) {
if( is_admin() ) {
$query->set( 'posts_per_page', 200 );
}
}
save_post
and sort by this fieldDidn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question