I have created a View that lists terms from a custom Taxonomy.
Inside this View I've added a Content Template (using the Content Template button) inside the wpv-loop.
Now, the problem I'm seeing is this:
When I place the View on a 'Page' it works fine, and the markup from the Content Template is rendered correctly.
However, I also want to use the view in a custom "WordPress Archive" created using Views. Here, the Content Template does now display anything, however markup placed directly in the View works fine.
Note that the View is being placed outside the Archive loop.
Is this known behaviour? Is there a way around this so that I can use a Content Template in this View, when used on an archive page?
Regards,
Andy
I can confirm the issue
I have seen similar problems in past, but never on Archives.
As soon the content of what you put in Content templates (used on Views) is insert directly to the View, all is fine.
If used on the Content Template and the View is nested, the output breaks.
But all past cases have been solved with the latest Views.
This one is new and I will need to send it to the Developers to analyze it.
A workaround is only to put the Content Template's content into the View, just as you did it above.
I also see this only happens in this very specific setup, having a TAXONOMY View with a Content Template on a ARCHIVE.
All other possible combinations are working fine (post view in archive, or taxonomy view in another View)
Thank you for reporting this, I will update you with news here ASAP.
Hello,
I have been escalated to this thread. I've just found out an issue in the code when rendering the CT outside of the loop and I've forwarded to our development team. I'll keep you posted.
Hello,
The development team confirmed that bug and we are going to fix that soon. Unfortunately I don't have a date, the available workaround is avoid using Content Templates in the Taxonomy View, but put the content directly in the loop output. Thank you for your understanding.
Hey guys,
Thanks for taking action on this. For my part, I have now implemented a work around for this so for the time being my immediate issue is solved.
Happy to mark this issue closed from my end.
Thanks again and Regards,
Andy
All right, you are welcome.
UPDATED: Added a screenshot for clarity
Andrzej,
What was your workaround?
I'm having this problem too.
I'm trying to display a taxonomy view on a WordPress archives - but OUTSIDE of the loop. (It works INSIDE the loop.)
Thanks for any tips!
Craig,
I actually had a new requirement come up from the client so the workaround was in the form of a different approach to the problem.
Specifically, I needed a lot more meta data to be available for each taxonomy item (custom content on archive pages, multiple images etc) so I set up a CPT that matches up with the taxonomy.
Regards,
Andy