Skip Navigation

[Resolved] Invoking a custom term field value for an image

This thread is resolved. Here is a description of the problem and solution.

Problem:

The customer wanted to know if there is a way to set the image from a Toolset term field, as a background in a Beaver Builder template for the taxonomy archive.

Solution:

Guided that this is possible and when you click the dynamic source option icon in the row's background settings, the dropdown includes the "Archive Term Meta" option.

Once, you select this option it asks for the field key and if you include the term field's key with the "wpcf-" prefix, it correctly gets the background image from the related term field.

Relevant Documentation:

n/a

This support ticket is created 2 years, 2 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/Karachi (GMT+05:00)

This topic contains 4 replies, has 2 voices.

Last updated by georgeF-2 2 years, 2 months ago.

Assisted by: Waqar.

Author
Posts
#2253019
Thumbnail-and-Banner-Category.JPG
Term-Field-Group.JPG
Product-category-post-field-value.JPG
Product-Category-Archive-layout.JPG

Tell us what you are trying to do?

I'm trying to load a custom term value in a Beaver Themer category archive layout to display a banner image for the category

Is there any documentation that you are following?

Not directly.

Is there a similar example that we can see?

Found one or two questions that seemed similar but they dealt with Views instead of types.

What is the link to your site?

Links and description follows. I understand this is likely outside of Toolset support as it involved Beaver Builder, but I thought I'd give it a hail mary.

We are working on a custom category page layout using WP Types and Beaver Builder Themer.

We have created a layout and hope to use a custom field added via WP Types to the product category.

On this page here:

hidden link

You can see how the 'Lighting and Signage' category has a thumbnail as set using the traditional category thumbnail configuration for WooCommerce product categories.

If we open up that category and go to the Lighting and Signage sub category, we have a section across the top that we want to use for displaying a different image

hidden link
(If we use the same product category image, our proportions would be off kilter for the new space)
We've added a Term custom field group called Product Category Options which is assigned to woocommerce product categories.  

Inside we have a Term Field called "Product Category Banner" with the slug 'product-category-banner' which as we understand it is referenced as 'wpcf-product-category-banner' when addresses through Toolset or a WPBB custom key callout.  

You can see this element in the attached Term-Field-Group.JPG

You can also see the category itself in the screenshot Thumbnail-and-Banner-Category.JPG with both a thumbnail image as seen on the first link and a Product Category Banner image that does not currently display on the site

If we edit our Product Category archive layout, and evaluate the Row Settings for our banner row as seen in Product-Category-Archive-layout.JPG, we can see that we've set the photo source to Post Custom Field

For that Post Custom Field, we've tried a variety of scenarios

post:custom_field key="wpcf-product-category-banner"
post:custom_field key='wpcf-product-category-banner'

term:custom_field key="wpcf-product-category-banner"
category:custom_field key="wpcf-product-category-banner"

all with a varety of " or '  and sometime swith some wpbb prefaces, with and without the [] etc. 

We're not having much luck, and so I wanted to reach out and see if you had any insights you could offer us on how to correctly reference the data point

Thank you very much, we appreciate any help you may be able to shed on this inquiry. 

George

#2253347

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi George,

Thank you for contacting us and I'd be happy to assist.

To share some suggestions or workaround, I'll need to see exactly how this archive template is set up in the admin area.

Can you please share temporary admin login details, in reply to this message?

Note: Your next reply will be private and it is recommended to make a complete backup copy, before sharing the access details.

regards,
Waqar

#2254657

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for sharing the admin access.

I'm currently performing some tests on my website with a similar setup of an archive page.

I'll share my findings with you, as soon as this testing completes.

Thank you for your patience.

#2255403

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for waiting.

During troubleshooting, I noticed that when you click the dynamic source option icon in the row's background settings ( screenshot: hidden link ), the dropdown includes the "Archive Term Meta" option ( screenshot: hidden link ).

Once, you select this option it asks for the field key and if you include the term field's key with "wpcf-" prefix ( screenshot: hidden link ), it correctly gets background image from the related term field ( screenshot: hidden link ).

#2255413

My issue is resolved now. Thank you!

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