At the bottom of a CPT "Case", the client needs to hand pick 3 related items from different categories, 1 is another web page and 2 other CPT. As we have an Elementor Template for "Case", we need to make this selection of the 3 related items dynamic, so we created 3 custom fields for Case (related-expertise, related-case, related-knowhow).
Elementor lets us use custom queries (hidden link) but we are struggling to load the wpcf-related-expertise we entered for a test case.
Hello. Thank you for contacting the Toolset support.
The thing is that you shared the Elementor hook and I honestly do not have any exposer with Elementor hook. I suggest better you should contact the Elementor support and let us know if they require any help from Toolset.
I understand.
What if we'd use Toolset View for our Query. How would we be able to select a post/page based on the ID that is filled in in a custom field?
I was already heading in that direction before your last post, but still struggling.
I have hardcode the ID for testing, "2" is a sample page
[wpv-view name="related-expertise" related="2"]
but it still says no items found
Can you please share problem URL where you added view with shortcode attribute as well as admin access details.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
sorry for the confusion, I did not realize the shortcode had again been replaced by the TP Dynamic Listing widget.
I have corrected it, it is in the left column at the bottom.
The issue was you have set your view to query wrong post type (pages). I've set the view to query correct post type "Case" and I can see its working as expected.
Well, client requested to load a specifc Page in the left column, a specific Case (CPT) in the middle column and a specific Know How (CPT still to be built) in the right column.
Is that possible?
I have now 2 Views, 1 queries the Pages (Related Expertise), the other queries the CPT Cases (Related Cases).
In order to simply test if the short code works, I have hard coded 2 IDs, Page #583 and Case #350.
Result: the page query shows no results found and the case query shows the current case instead of #350.
I have now changed my 2 Views to filter 'Include only posts with IDs set by the View shortcode attribute "related"' instead of 'Select items with field: Related Expertise is a string equal to VIEW_PARAM(related)' And this now shows the requested Page and Case.
However, we cannot of course hard code the ID in a template, we need to dynamically "read" the input from the Custom Field.
So how do we replace "583" in [wpv-view name="related-expertise" related="583"] with the content of the Custom Fields "related-expertise" and "related-case"?