Custom Fields
Support MB Views Custom taxonomy 'single' not displaying

  • Creator
  • #31885
    Resolved Jim Hunter

    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
  • #31886
    Long Nguyen

    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

    Jim Hunter

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


    Jim Hunter

    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.

    Jim Hunter

    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.