I am using terms as my filter in the view. But since the shortcode isn't outputting the IDs as in the first example, this isn't working and the filter isn't getting the correct results.
We're grabbing the ID's of attributes for products in the cat page.
When it's outside of the view it's outputting something like "4,16,73,56,91,103" as the ID for each attribute. And, we are using that dynamic [post-cat] to get the cat page we're on. It's working fine: [myShortcode catagory="[post-cat]" type="id"]
When inside the view it works until we add that [post-cat] -- maybe because it's 3 deep?
This works: [myShortcode catagory="power-tools" type="id"]
This doesn't: [myShortcode catagory="[post-cat]" type="id"]
Final shortcode looks like: [wpv-view name="myViewName" terms="[myShortcode category="[post-cat]" type="id"]"]
A view shortcode. Shortcode attribute is "terms" where I then use my shortcode. Then, try to dynamically set the category.
You are passing an entire view into your custom shortcode. Have you disable the wrapper on this view [wpv-view name="current-page-taxonomy-slug"]?
If not then you need to edit the view and then ensure that the checkbox is checked that disables the wrapper div. This checkbox should be below the loop output section.
Secondly test your shortcode like this only [myShortcode category="[wpv-view name="current-page-taxonomy-slug"]" type="id"] to ensure that your view only returns what you want.
I'm assuming this view [wpv-view name="current-page-taxonomy-slug"] returns the slug of the taxonomy of the current page. Then your custom shortcode here "myShortcode " returns the ID of the taxonomies?
Then you are passing these ID's into another view in order to filter that view by the same taxonomy ? Assuming that its similar posts to the current page or to display related posts based on the taxonomy?
The reason I ask this is because on your view [wpv-view name="myViewName" ] you can just add a taxonomy filter to the view and set that filter to filter based on the current page. You won't need to explicitly pass the ID's of the terms into the view because the filter will be able to automatically pick this up.