I am trying to create a taxonomy archive template that will display a consistent layout for each associated custom post type, but will also display dynamic information based on the taxonomy value selected by the user. My custom post type is "Courses" My Taxonomy is "Course Categories" An example of a taxonomy value might be "Adobe", while corresponding post types would be Photoshop Training, InDesign Training, Illustrator Training, etc. I'd like to create a layout that lists all of the corresponding courses for a specific taxonomy value but also add some additional information (static and dynamic) to the template for each specific taxonomy value (Adobe, Microsoft, etc.)
I followed the documentation for created custom taxonomy archives successfully - but that only displays the associated post types, and I'd like to add more to each page. I don't want to create a custom page for each Taxonomy value and use a view because that will duplicate the taxonomy archive created automatically by WordPress and, in addition to not knowing how to disable that) I'd like to use it as is - it matches my current sites URL structure.
Here is an example of what I am trying to achieve: hidden link The Course Category would be Adobe, the Courses listed on the page would be associated Custom Post Types but the other information would be either static (and specific) to just Adobe courses (like the paragraph at the top) or dynamic (like the associated blog posts or videos on Adobe) For Microsoft, and other Taxonomy values it would need to change. Is there a way to create this in Toolset? I can create the basic Archive template to display for each Taxonomy value and list the courses, but can't figure out how to make each result specific to the taxonomy value chosen (I understand that the value of a template is for pages that will have the same output - but I guess I'm trying to create a hybrid of template and custom content?) Perhaps I'm not approaching it correctly!
Hello and thank you for contacting the Toolset support.
WordPress archives are dynamic pages that are pulled from the database. For taxonomy archives, they can also pull term fields. This being said, I would like to ask what is the static content that you intend to put on the archive template? Can this data be stored in the database(term fields, for example) and get pulled?
You can also put views inside archive templates, but we currently have a limitation on AJAXified views. AJAX can't be enabled on views inside an archive template.
Depending on how you build the archive templates, using the block editing experience, or the legacy editor, you can conditionally display content depending on what term is this archive, this way you can put different elements for the terms "Adobe" and "Microsoft".
I hope this answers your requests. Let me know if you have any other questions. Let me know if you started building an archive and you felt stuck on something.
Thank you for the quick reply, Jamal. Based on your answer, it sounds like Term fields for Taxonomies is what I am looking for. That way (if I'm understanding correctly) I can add custom values to each Taxonomy value that I create and then display those values on the front-end when that Taxonomy is selected. Have I got that right? If so, I will try that out today and let you know if I run into any problems. Thanks again!
I was able to add a couple of Term fields in a field group and associate it with my taxonomy. I'm also able to fill the values in with data and save it. But when I go to add those field values to my taxonomy archive template, they do not appear when I click on "Fields and Text." I tried to add a view to the taxonomy archive page and put them there, but I get an error when I do that that nested views are not allowed. Not sure what I am doing wrong or if I am going about this the wrong way. My taxonomy structure looks like this:
Adobe
- Acrobat Training
- Photoshop Training
- InDesign Training
When the user goes to [mysiteurl]/course-categories/adobe I'd like them to see the "children" listed out on the page (which I am able to do in a loop successfully) but then I'd also like the Description and Image term fields for "Adobe" (not the children) listed at the top of the page. Like my example of hidden link
I've attached some screen shots to show you what I have done so far. Thanks again for your help.
Would it be possible to allow me temporary access to your site to check it closely? If yes, your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **
If it is not possible, I would like to know how are you building the archive template? Using Blocks or the legacy editor?
I can also create a new installation on our platform and we can work on it together to show how this can be done.
Let me know what you would prefer.
Unfortunately I'm building it on my local machine using Local Hub so I don't think there is a way for me to let you login. If a Zoom or Teamviewer session is possible I can definitely let you see what I have. Just let me know. I believe I am using the Block Editor for the Archive page. Attached is where I am going to edit it. If I'm not able to show you what I'm doing, just let me know what info you need from me to create something. Thank you so much for the help!
Of course, your next reply will be private to let you share credentials safely.
It would be helfpul if you prepare the required data and if you explain what should be displayed? and when?
Hi Jamal - could you send me the request for my credentials? The last reply didn't give me the option of supplying them privately. Also I have attached a screenshot of the type of page I am trying to build. My custom Taxonomy is Course Categories. My custom type is Course. Each Course will belong to a Taxonomy. For example, Adobe InDesign Training will belong to the Adobe Training taxonomy. I created a custom archive page for Course Categories and I am able to loop through the Courses that belong to that Taxonomy, but I am not able to output my custom Taxonomy Term values on the template. So, for instance it should show the description for Adobe Training Classes on the Adobe Course Categories archive page, but should show the description for Microsoft Training classes on the Microsoft Course Categories archive page. Thanks again for your help.
Thank you for sharing access details and all required information.
Toolset Blocks do not support Taxonomy and User views. As well as, nested views are not supported yet.
I've workaround to share using the classic view - where, we can create the taxonomy view using classic view and within the taxonomy view add the required custom term fields and display the taxonomy view using the "Fields and Text" block.
you can check here I've added the taxonomy view using "Fields and Text" block at top of the archive:
=> hidden link
And created the following taxonomy view in classic view mode:
=> hidden link
Thank you, Minesh. It looks like this is doing what I need so that is a great start for me to work off of. Are there any plans to support this functionality without using Classic Views in the near future?