Custom taxonomy 'single' not displaying
- This topic has 5 replies, 3 voices, and was last updated 1 year, 7 months ago by
BB.
-
AuthorPosts
-
November 12, 2021 at 2:11 PM #31885
Jim Hunter
ParticipantI created a custom taxonomy for a CPT and when I try and show my custom view for the Single page, it does not render. The attached images are what I have created for testing and the URL I am going to that just displays the default taxonomy page, not my view. Any suggestions would be appreciated.
November 12, 2021 at 4:12 PM #31886Long Nguyen
ModeratorHi Jim,
If you want to use the View to render the content of the taxonomy page, you need to use the Type: Archive, Location: Taxonomy Archive. Screenshot https://share.getcloudapp.com/5zu9ro2D
November 13, 2021 at 12:22 AM #31890Jim Hunter
ParticipantThat seems to have worked great, thanks!
But I never would have tried using Archive, so thanks for the response.Jim
November 14, 2021 at 3:11 PM #31904Jim Hunter
ParticipantOK, related issue. I was able to display the info I needed but there is a rub. The list of posts need to be grouped into 2 groups and displayed as groups. So, I created a view that displays one set and that works great. I then created a view that displays the second set, and that view works great. But when I try and have both views active for the same taxonomy, then only the second one displays. I have their orders set as 1 and 2 accordingly, but only 2 displays when both views are published. If I set 2 to Draft, then 1 displays correctly.
A simple solution would be to combine both views together but I found no documentation on how to reset the query in the view. If I simply try and re-loop it, I get no results. So, if there is a simple way in a view to reset the query, then that would solve my problem the easiest way.
November 14, 2021 at 3:23 PM #31905Jim Hunter
ParticipantI answered my own question.
If I add this line right after the first loop finishes, it does reset the loop and I can then run the second group:
{% set x = mb.wp_reset_postdata() %}
I know the x is garbage, but I get errors trying to just execute the method, I had to assign the result to a variable for it to work.
March 27, 2024 at 9:29 PM #45036BB
ParticipantI have a similar issue. I followed everything in the Getting Started part of the manual. I created a custom post type 'Book', a taxonomy 'Author', and a custom field set. I've created a view, but the Author is not shown.
See images here: https://imgur.com/a/gcfeGry
What could be the issue?
-
AuthorPosts
- You must be logged in to reply to this topic.