I am building an online bookstore and I have the authors set up as a taxonomy for the Products. I have an Authors page which displays a View of all of the Author Taxonomy items (enlace oculto) and each photo and name is linked to the individual Author page which I have set up under the WordPress Archive template.
If the Author has a book in the shop that they are associated with, their Author page loads fine. Example: enlace oculto
If the Author does not have a book in the shop, their Author page loads blank. Example: enlace oculto
It makes sense that whatever is in the loop would not show up if nothing is returned but their photo and bio are set up outside of the loop via an imported Content Template.
Here is my WP Archive Loop Editor:
[wpv-layout-start]
[wpv-post-body view_template="content-template-for-authors"]
<div class="upper-title">Books by this Author</div>
[wpv-items-found]
<!-- wpv-loop-start -->
<div class="grid">
<wpv-loop>
<div class="related-prods">
<div class="product-img">
[wpv-woo-product-image size='shop_single' output='img_tag' enable_third_party_filters='no' gallery_on_listings='no']
[wpv-woo-onsale]
</div>
<div class="prod-title">
[wpv-post-link]
</div>
<div class="prod-tax">
by [wpv-post-taxonomy type='authors']
</div>
</div>
</wpv-loop>
</div>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
<h2>No items</h2>
[/wpv-no-items-found]
[wpv-layout-end]
My goal is that for all authors (and for all taxonomies - I am having this problem elsewhere), that the content outside of the wpv-loop (in this case, the photo and bio) will show up regardless of whether or not there are items in the loop.
The site is password protected during development, the username is demo and password is cincopuntos.
That's odd, I was just investigating this on your site and it started working. I switched from the child theme to the parent Genesis theme, and it started working. Then I switched back to the child theme and it is still working...I can see the "Books by this Author" text appear. Coincidence, or were you also making changes?
That is odd. I see some changes to other WP Archives after the theme selected was changed and then back. I was not working on the site.
Can I put a content template into the loop (e.g. have it show up in both the wpv-items-found and the wpv-no-items-found)? I want the photo and bio to show up regardless. I just tried that now and it didn't work but thought there may be a different way to include it. I was able to put the title into the two sections without any problems.
In your case, it looks like Content Templates are not working well in the Archive's Loop Editor. I was able to place the content from the Content Template directly inside the Loop Editor, and it seems to be working now. Can you take a look?
I am seeing the photo and bio now (thank you!) - I traced this back to the Woocommerce View templates settings - I didn't originally have them both set to Toolset > Woocommerce Views.
My remaining issue is that the two of the three taxonomy archives (Illustrators and Translators Detail page) are not displaying like the third (Authors Detail page). I have the Archive Layout on both set to Full Width Content.
Examples:
Author: enlace oculto
=> Displaying correctly.
Illustrator: enlace oculto
=> Unwanted sidebar and extra bio showing up above the content.
Translator: enlace oculto
=> Unwanted sidebar.
I don't see any difference between the two WordPress Archives (Author Detail page) and (Illustrator and Translator Detail page). What am I missing?
I resolved the extra bio (taxonomy description). It was coming from line 819 in the wc-template-functions.php file in woocommerce. I removed it by adding the following to functions.php:
remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 );
My remaining issue is that the two of the three taxonomy archives (Illustrators and Translators Detail page) are not displaying like the third (Authors Detail page). I have the Archive Layout on both set to Full Width Content.
I don't see anything in the WordPress Archive that would be causing this. Since that View is used in the Blog Sidebar widget, my guess is there's a sidebar registration issue or something going on in the custom theme files. I tried switching back to the parent Genesis theme temporarily to do some troubleshooting, and now that I've switched back to CincoPuntos everything looks...different. What do I need to do to revert to how it was before I switched to the parent theme?
Yeah, switching back and forth between themes has a tendency to mess up the settings and the widgets. I can revert it to the backup. I was hoping to track down the specific issue and fix it but for now I'll just use display: none to hide them. Thanks for your help!
My issue is resolved now. Thank you!