Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

同一のオプションページに複数のフィールドグループを設定して、投稿の属性>順序を指定しても並び替えがうまくいかない #100

Open
showtech-jp opened this issue Jun 5, 2024 · 0 comments

Comments

@showtech-jp
Copy link

showtech-jp commented Jun 5, 2024

get_postsのargs->order_byではなく args->orderby に修正が必要

smart-custom-fields/classes/class.scf.php : 421-427

$args = array(
  'post_type'      => SCF_Config::NAME,
  'posts_per_page' => -1,
  'order'          => 'ASC',
  'order_by'       => 'menu_order',
  'meta_query'     => $meta_query, // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query
);

↓

$args = array(
  'post_type'      => SCF_Config::NAME,
  'posts_per_page' => -1,
  'order'          => 'ASC',
  'orderby'       => 'menu_order',
  'meta_query'     => $meta_query, // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant