Skip Navigation

[Resolved] Show taxonomy image on archive page

This support ticket is created 5 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 7 replies, has 2 voices.

Last updated by jesseH-3 5 years, 3 months ago.

Assisted by: Luo Yang.

Author
Posts
#1391915
screenshot2.png
screenshot1.png

I am using Toolset Views 3.0-b2

I am trying to show a taxonomy image on an archive page

I believe I need to create a view to do this. So I have tried to create a view within the block editor. I choose the content the view will display, and I get an error message as shown in the attached screenshot2. Or sometimes it just hangs and I have to reload the page.

So instead I created a view outside of the block editor, and then tried to add it with a View block. But when I click the dropdown to select an existing view, the name of the view is blank (screenshot1). If I try to select the view without a name, I get an error "Error while retrieving the View preview. The selected View (ID: undefined" was not found.

I also keep getting a notification while editing the archive, it says "The second View Output block has automatically been removed." What does this mean?

#1392095

Hello,

Thanks for the details, I can log into your website and see the problems.

There are two problems.

Screenshot 1.
https://toolset.com/wp-content/uploads/2019/11/1391915-screenshot1.png

I can duplicate the same problem in my localhost, and have escalated it, will update here if there is any news.

Screenshot 2.
https://toolset.com/wp-content/uploads/2019/11/1391915-screenshot2.png
This expected result, , as the message in screenshot, one View block can display only one view outputs in block editor, as a workaround, you can display the taxonomy view using view's shortcode directly, I have done below modifications in your website:
1) Edit the WordPress archive:
hidden link
Add a shortcode block just below before "WordPress Archive Output" with the the taxonomy view's shortcode:
[wpv-view name="show-membership-image"]
More help:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-view

2) Edit the taxonomy view "Show membership image":
hidden link
in section "Loop Editor", replace the content template shortcode from:
[wpv-post-body view_template="loop-item-in-show-membership-image"]

With:
[types termmeta="membership-logo"][/types]

This is a known issue when you use taxonomy view insider other post view/Wordpress archive, the content template won't work in this case, see the errata here:
https://toolset.com/errata/views-shortcodes-return-empty-output-after-ajax-pagination-triggering-in-a-taxonomy-view/

Please test again, check if it is fixed.

#1392581

Thanks for your help. You said "One View block can display only one view outputs in block editor"
I am not sure I understand. Do you mean that one View block can only display one result (the first result output by the view)? Or are you saying that I can only have one View block per page? Please explain.
Is this also the reason I receive the message "The second View Output block has automatically been removed."?
Is this a known issue that is going to be fixed, or is this intended behavior?

Anyway, I understand that you have used a shortcode block instead of the View block to display my view because of the issues above.
I also understand that there is a known issue with using a content template in a taxonomy view for another post's archive. (By the way, I wish that "Use a Content Template" was not checked by default!)

#1392887

Q) Or are you saying that I can only have one View block per page? Please explain.
That means you can only have one view per view block, the view block does not support nested view(view insider view).
That is the reason of the message "The second View Output block has automatically been removed."

#1392893

Q) I wish that "Use a Content Template" was not checked by default
That has been escalated to our to-do list as a bug, our developers are working on it, but I am not sure when will be fixed.
In your case, the only workaround for now is:
When you put a taxonomy view insider WordPress archive of taxonomy archive page, avoid wrapping the fields in a Template until this gets solved

#1393779

Thanks, but I'm sorry I'm still not completely understanding.
You said "you can only have one view per view block, the view block does not support nested view (view insider view)."
But I don't have a view nested inside of a view.

Do you mean that I have a content template inside a view? If yes, then I understand.

#1393945

I mean this, when you are using block editor, and add a view block "View-A" insider block editor, you can not add another view block insider view block "View-A", this is a limitation of Views block editor.

#1397955

I don't believe I am adding a view block inside of an existing view block. I don't even know how I would do that. Anyway, you can close this ticket.