Hello Greenshift team,
I am using the Query Builder together with the filter blocks and have found that the list is built differently on initial page load than when it is reloaded after a filter click. Settings that are respected on page load are ignored after the reload. I have two reproducible symptoms, and I believe they have the same root cause. I tested carefully to rule out a configuration mistake and describe the details below.
== 1. General problem ==
On page load, the Query Builder applies its own settings correctly (sorting and Visibility settings). As soon as the list is replaced via a filter (the separate Filter block or the filter panel integrated in the Query Builder), the replacement list is built without some of these settings:
(a) The separate Filter block loads its results from a REST endpoint that sorts by post date, not by the block’s “Menu Order” setting.
(b) The filter panel integrated in the Query Builder keeps the correct sorting, but the Visibility settings of the inner blocks are not applied, so elements that should be hidden are shown.
== 2. Environment ==
- WordPress 7.1.4, PHP 8.3, hosting: IONOS
- Theme: Blocksy with a child theme
- Greenshift: 13.2.2 (Free), Query addon: 5.9.9.2 (Paid)
- Custom post type “locations”, taxonomies “listing” and “locations-category” (ACF)
- Ordering of the posts set manually with the “Simple Page Ordering” plugin (menu_order)
- Query Builder block ID: gsbp-392a446
- Page URL: [URL of the page]
== 3. Observation A: Filter block ignores “Menu Order” ==
Setup:
- Query Builder block: Data settings > Order by = “Menu Order”, Sorting = “Ascending” (saved).
- Source: post type “locations”, taxonomy filter “listing” = oderbruchbuden.
- All posts have an identical publish date (4 Nov 2026, 18:50), so a sort by date looks like a random order.
To check which queries actually run, I added a temporary snippet that only logs the ORDER BY part of every SQL query touching post type “locations” (via the posts_request filter) and does not change any query. It records the request context. Results for one session:
Initial page load of /area/ (context: normal page request):
ORDER BY ggwv_posts.menu_order ASC
Click on a button of the separate Filter block (context: REST, /wp-json/greenshift/v1/get-gs-posts/):
ORDER BY ggwv_posts.post_date DESC
(in addition, the request is preceded by /wp-json/greenshift/v1/indexer-count/)
Click on a filter of the integrated filter panel (context: admin-ajax.php):
ORDER BY ggwv_posts.menu_order ASC
So the same Query Builder block is sorted by menu_order on page load and via admin-ajax, but by post_date DESC via the REST endpoint get-gs-posts. The backend order (set with Simple Page Ordering) is correct; the frontend order after using the Filter block is not.
Things I have ruled out:
- The block setting is saved as Menu Order / Ascending. The initial SQL confirms that Greenshift uses it.
- Caches were cleared and I tested in a private browser window.
- The Filter block has no sorting option of its own, so there was nothing I could set there.
- I tested code that overrides the order arguments through gspb_module_args_query_id and gspb_module_args_query. It had no effect on the Filter block result, which fits the log: that request is not built through the Query Builder arguments. I removed this code again.
== 4. Observation B: Visibility settings are ignored after the filter reloads the list ==
Setup:
- Each card (a Query Builder item) contains several rows, e.g. address, website, phone number, distance. Each row is a Box Container with an icon and a dynamic value.
- On the row containers, Advanced > Visibility settings is enabled: “Use visibility settings” = on, “Do not show content for selected” = on, type “Custom meta”, Custom field key “distance-a” (analogous keys for the other rows), Custom field value empty, Operator “=”. The intent: do not show the row if the field is empty.
- Posts without a value in the field are the intended case, e.g. “Aldi” has no website and no phone number.
Behaviour:
- Page loaded without a filter (screenshot 1): The rows with empty values are hidden. The card for “Aldi” shows only address and distance; “Apothekennotdienst” shows only the phone number. No image placeholders. This is the intended result.
- After clicking “Show all” in the filter panel (screenshot 2), the same posts are rendered again via AJAX: All rows appear, including the icons of rows without a value. The cards also show an image placeholder where no image exists. Cards are much taller and the layout is different.
The data did not change between the two states: it is the same posts, the same fields and the same block settings. The only difference is how the list was produced (page load vs. reload through the filter panel).
Things I have ruled out:
- The Visibility settings are active and work on page load, so the condition itself is correct.
- This is not a caching issue: the unfiltered state is correct on every load, the filtered state is always wrong.
- The same card template is used in both states.
== 5. What I would like to know ==
- Is this a known issue? It looks like the reloaded list (REST endpoint get-gs-posts for the Filter block, admin-ajax for the filter panel) does not go through the same processing as the initial render (sorting from the block settings; Visibility conditions of inner blocks).
- Is there a setting that I overlooked to make the Filter block use the query’s sorting and the filter panel use the Visibility conditions?
- If this is a bug, can you tell me whether a fix is planned, or whether there is a hook that lets me apply the sorting and visibility conditions to these requests? Please let me know which filter or action runs for the get-gs-posts request.
Screenshots are attached:
- Screenshot 1: page load without filter (correct)
- Screenshot 2: after “Show all” in the filter panel (empty rows and placeholders visible)
- Screenshot 3: Query Builder Data settings (Menu Order, Ascending)
- Screenshot 4: Visibility settings of a row container
Thank you for your help.
Best regards,
Stefan




Post a Reply
You must be logged in to post a comment.