Is it possible to sort posts by custom column in wp_posts table (in this case, ‘fav_count’ column) using pre_get_posts filter? If not, is there any other way to do this before the main query is run, without modifying WP core files?

Read more here: Order posts by custom column using pre_get_posts


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: