Custom Fields
Re-Envisioned
Support MB Views Custom taxonomy 'single' not displaying

  • Creator
    Topic
  • #31885
    Resolved Jim Hunter
    Participant

    I 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.

    URL: URL
    page: Page
    view: View

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #31886
    Long Nguyen
    Moderator

    Hi 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

    #31890
    Jim Hunter
    Participant

    That seems to have worked great, thanks!
    But I never would have tried using Archive, so thanks for the response.

    Jim

    #31904
    Jim Hunter
    Participant

    OK, 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.

    #31905
    Jim Hunter
    Participant

    I 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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.