I have a somewhat difficult question.
Is it possible to change the get_posts() or wp_query() function to alter the results that are returned?
- For example, you want to show some posts/pages with a specific meta lower in the list than other pages
- You want to show the post with post type 'custom' lower in the list than other pages
Is there some hook for this :)?
I have a somewhat difficult question.
Is it possible to change the get_posts() or wp_query() function to alter the results that are returned?
- For example, you want to show some posts/pages with a specific meta lower in the list than other pages
- You want to show the post with post type 'custom' lower in the list than other pages
Is there some hook for this :)?
Share Improve this question asked Jun 9, 2020 at 14:17 Daansk44Daansk44 101 01 Answer
Reset to default 0do you mean something like this?
https://developer.wordpress/reference/hooks/pre_get_posts/
Here you can alter the query before it is actually run.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742362549a4429669.html
评论列表(0条)