I'm trying to use the shortcode below on a page. I'm using WP Bakery. But it's not rendering correctly. If I enter a id manually replacing the custom field string, the code renders. What am i doing wrong?
[wpv-view name="Project Related Products" ids="[wpv-post-field name='project-related-products']"]
I'm not sure if I understand exactly what you mean. If I use the same shortcode in a Toolset content template and place it on the page in a text field in WP Bakery, the shortcode works without any problems.
1) This doesn't work > and shows a " on the page.
[wpv-view name="Project Related Products" ids="[wpv-post-field name='project_related_products']" cached="off"]
If I put this same shortcode in a Toolset content template and include it in my page like this:
2)The only problem left then is the fact that the view shows all possible products if no value is available for [wpv-post-field name='project_related_products']
How can I solve this the best way? Should it work directly without the need of a Toolset content template (1)? And how do solve the all results issue (2)?
What the [wpv-attribute] shortcode allows you to do is to check if the value being passed into the view is coming in correctly.
Essentially if you add the [wpv-attribute] shortcode inside your view you should be able to tell what value is being passed into the view. If no value is being passed then it gives you some direction in where to look to solve the issue.
So what I would do is add [wpv-attribute name='ids'] inside your view then check your view on the frontend to see if the value of the [wpv-post-field name='project_related_products'] shortcode is being printed out by the [wpv-attribute name='ids'] inside the view.
Thanks, that works. De view prints an id, 9134 in my case. So it seems it works. Id is corresponding to the correct product. So I guess it's the page or WP Bakery I'm using which is capable of working with the shortcode? It seems like it cuts it off somehow. Like I mentioned, when using a Toolset content template as a "workaround", it works.