You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're using SCPO alongside custom blocks that allow setting a custom order of objects.
SCPO overwrites the orderby parameter in queries within blocks in the editor preview/admin.
I narrowed the issue down to line 498, where the check says if (isset($wp_query->query['post_type']) && !isset($_GET['orderby'])) {
Changing this to if (isset($wp_query->query['post_type']) && !isset($wp_query->query['orderby'])) {
allows for queries with custom orderby values within the editor.
I've not found any issues with rewriting this line. Orders set by SCPO still work in other admin screens. This might need more testing though. If this isn't conflicting with other screens, I'd welcome this change for better block compatibility.
The text was updated successfully, but these errors were encountered:
andyluak
added a commit
to WPChill/simple-custom-post-order
that referenced
this issue
May 12, 2021
We're using SCPO alongside custom blocks that allow setting a custom order of objects.
SCPO overwrites the orderby parameter in queries within blocks in the editor preview/admin.
I narrowed the issue down to line 498, where the check says
if (isset($wp_query->query['post_type']) && !isset($_GET['orderby'])) {
Changing this to
if (isset($wp_query->query['post_type']) && !isset($wp_query->query['orderby'])) {
allows for queries with custom orderby values within the editor.
I've not found any issues with rewriting this line. Orders set by SCPO still work in other admin screens. This might need more testing though. If this isn't conflicting with other screens, I'd welcome this change for better block compatibility.
The text was updated successfully, but these errors were encountered: