I have a custom post type "Lodge" which includes a a RFG called "Species" and a RFG called "Package".
I have view "edit-lodge-details-page", which displays a form for editing the a Lodge post and displaying other views. One the other views that is displayed inside that view is "edit-packages-lodge-details-page".
The view "edit-packages-lodge-details-page" is configured for "Package" RFGs, and the Query filter is set to select items from Package groups as related items of the current post in the loop. See (image1.jpg)
The loop editor of this view is as follows:
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop>
<div class="package-item">
[wpv-view name="edit-package-details-lodge-details-page"]
<div class="rfg-delete">[cred_delete_post_link post="[wpv-post-id]" text="Delete this package" action="delete" class="cred-refresh-after-delete"]</div>
<hr>
</div>
</wpv-loop>
[cred_form form='add-package-lodge-details-page' post="[wpv-post-id]"]
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
<strong>[wpml-string context="wpv-views"]No packages found[/wpml-string]</strong>
[/wpv-no-items-found]
[wpv-layout-end]
When I view a post with the "edit-lodge-details-page" view, everything in that view is as it should be. However, when it displays the "edit-packages-lodge-details-page" view, it will only output "No packages found".
What's especially strange is that "edit-lodge-details-page" view includes another sub-view called "edit-species-lodge-details-page". This other view is configured exactly the same as the "edit-packages-lodge-details-page" view (it's configured for "Species" RFGs, and the Query filter is set to select items from Species groups as related items of the current post in the loop). It outputs information exactly as expected however.
I can see no obvious reason why this happening. Can you shed some light?
To see a post with the "edit-lodge-details-page" view, login (see below) then go to page hidden link
Hello,
Please edit the post view "Edit Packages (Lodge Details Page)":
hidden link
in section "Ordering", you are using option: order by "Field Price", that means all results need to setup value in field "Price", this is a limitation of WordPress WP_Query, see the document:
https://developer.wordpress.org/reference/classes/wp_query/#order-orderby-parameters
‘meta_value‘ – Note that a ‘meta_key=keyname‘ must also be present in the query.
You might consider to change it to: order by post title/date.
My issue is resolved now. Thank you!