Skip Navigation

[Resolved] Create graphical taxonomy grid

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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 22 replies, has 3 voices.

Last updated by lawrenceK 5 years, 4 months ago.

Assisted by: Christian Cox.

Author
Posts
#1143651

Hello guys

Page: hidden link

I would like to display a grid of the subcategories for the parent category (survey equipment) on this page, hopefully with an image and the name of the subcategory. So, the page above contains information about survey equipment (parent category) and I would like to show the subcategories in a graphical grid so that when the user click on any subcategory they are taken to another page where all the products in that subcategory are displayed.

The subcategories are:
Total Stations
Software & Systems
Levels
Laser Scanners
GNSS Systems

I'd like to show a block containing an image and the name of the subcategory for each of these subcategories on this page. When the user clicks any block, they should be sent to another page where all the products in that subcategory is displayed.

I'd really appreciate any help on how to achieve this.

Thank you.

#1144476

Hi, you can do this with a custom image field and a View of the Product Category taxonomy. First, create a custom image field on the Product Category taxonomy by creating or editing a custom field group in Toolset > Custom Fields > Term Fields tab. Then create a View of the Product Category taxonomy, and add a Query Filter set to filter by term parent where the term parent is set by the current taxonomy archive. If you cannot find the Query Filter panel, scroll to the top right corner and click "Screen Options" to activate the panel. In the Loop Wizard, select the type of grid you want to display, like "Bootstrap Grid" or "Table-based Grid". Insert the taxonomy term archive link, the custom image field, and the taxonomy term URL in the fields popup. Group these into a Content Template by checking the Content Template checkbox in the popup. Then use the taxonomy term URL shortcode to create a link wrapped around the image, so your site Users can click the image or the text link to go to the archive page for the corresponding term. Here's an example of the image and text link:

<a href="[wpv-taxonomy-url]">[types termmeta='your-image-field-slug' title='%%TITLE%%' alt='%%ALT%%' size='thumbnail' resize='proportional'][/types]</a><br />
[wpv-taxonomy-link]

Now insert this View in the Toolset WordPress Archive you have assigned to the Product Category taxonomy. The View should be placed outside the wpv-loop tags so it's not repeated.

#1144838
Screen Shot 2018-11-12 at 09.42.15.png

Hi Christian

Thank you for the detailed instructions!

I get stuck on:
"In the Loop Wizard, select the type of grid you want to display, like "Bootstrap Grid" or "Table-based Grid". Insert the taxonomy term archive link, the custom image field, and the taxonomy term URL in the fields popup."

Despite having created the custom image field in the product category taxonomy, it does not appear in the loop wizard, nor does the taxonomy term archive link. Are you perhaps meaning the post type archive link, as I do see that in the dropdown?

#1144870

Just trying to think ahead: What happens if a subcategory has child categories? Can this approach be adapted to allow for that?

#1145194

Hey @christian, sorry to push but I'm on a really tight deadline. 🙂 Can you assist when you have a moment?

#1145209

@christian-c, sorry to push but I'm under some pressure to finish this. 🙂 Can you assist when you have a moment?

#1145217

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Lawrence,

Christian is on Holiday today and will be back tomorrow to answer any concerns you may have.

Thanks,
Shane

#1145218

Hi @shane-c

Thank you, but I am not happy to wait another day on a time sensitive project because a member of staff is away (much as I understand that everyone is entitled to it). I specifically selected the option that any support team member can assist me when I opened the ticket, surely another team member can assist!??

I'm sorry, but I do not believe that this is how support works.

#1145567

I am seriously unimpressed with the support on this ticket. I do not expect to wait an extra day for a reply because other support staff are unable or unwilling to assist me when a team member is away. While I appreciate the hard work that you guys do to help users, I am angry that this situation has caused me to miss a deadline with my client which impacts on my reputation.

So in other words, if I open a ticket and a team member replies but then goes on leave for 2 weeks I'll have to wait that long to get my ticket attended to because other Toolset staff won't assist me?

I expected more from the Toolset team.

#1145954

Can I expect a reply on this ticket, @christian-c?

#1145969

Despite having created the custom image field in the product category taxonomy, it does not appear in the loop wizard, nor does the taxonomy term archive link.
I will be glad to take a closer look to see why this isn't working as expected. Please provide login credentials in the private fields here.

#1146008

Despite having created the custom image field in the product category taxonomy, it does not appear in the loop wizard, nor does the taxonomy term archive link
The "Taxonomy link" option is what I'm referring to as the taxonomy term archive link. It's avaialble in the options for fields in the Loop Wizard, but it turns out the custom fields for terms do not appear here. So after using the Loop Wizard to insert the available fields, you can place your cursor in the Template Editor for the "Loop item in Dynamic Category Menu", and insert the category image field by clicking the Fields and Views button. The shortcode will be generated automatically like this:

[types termmeta='category-image' title='%%TITLE%%' alt='%%ALT%%' size='thumbnail' resize='proportional'][/types]
#1146319

Thank you.
"Just trying to think ahead: What happens if a subcategory has child categories? Can this approach be adapted to allow for that?"

#1146553

It depends on what you mean by adapted, but I think you're asking if this approach works with multiple levels of term hierarchy. Yes, it does. If you place this Product Category Taxonomy View in the Toolset WordPress Archive assigned to Product Categories, it will appear on all Product Category term archive pages regardless of their hierarchy level in the Product Category taxonomy. The Query Filter is based on the current taxonomy archive so the child links and images will appear as expected for any hierarchical level in the archive. If no child terms exist for the current taxonomy archive term, the "No results found" section of the View will be displayed. You can configure that however you would like in the View's Loop editor.

#1146666

I have resolved the image issue, thank you for your help

I have tried to follow your instructions to the letter but when I click on a taxonomy link for categories, no products appear. I'm sorry to trouble you one last time, but can you please guide me in the right direction?

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.