Skip Navigation

[Resolved] Can I use a Taxonomy Term Image Field as background image?

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 3 replies, has 2 voices.

Last updated by Minesh 1 year, 1 month ago.

Assisted by: Minesh.

Author
Posts
#2648655
Screenshot_6.jpg
Screenshot_5.jpg
Screenshot_4.jpg
Screenshot_3.jpg

When I add Custom Image Fields to an existing post type or even a custom post type. I can use that image as dynamic image in an Elementor Widget, either as an image or as a background image.
This option however does not seem to exist for Image Fields added to a Taxonomy (Woo Product Category in my case)

#2648807

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Toolset has limited integration with Elementor where using Elementor you can display only post custom fields of certain type using elementor dynamic source.

At the moment, you can display term fields on a View listing terms and on a term archive page.

To display the custom term field, what you should do it create a taxonomy view and within that taxonomy, view add the term field you want to display and add this view inside your post view where you want to display the term field.

Please check the following Doc:
=> https://toolset.com/documentation/user-guides/displaying-wordpress-term-fields/

So - you will have to create a taxonomy view first using the legacy version of the view and then add the custom term field within this view and later add this view to your elementor template using text widget.

#2649767

If the Taxonomy custom image field is inside a Content Template, I still won't be able to set that image as a background image in an Elementor Container. I will use custom css to set a background image to a container, as each BODY tag has a unique class.

#2649811

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok - feel free to share the solution you use that might be useful for the other users.

#2649823

I added a class "taxonomy-header" to my Elementor Container.
Then used this custom CSS

body.archive.tax-product_cat .taxonomy-header {background-image:url(/wp-content/uploads//general-category-hero.jpg); background-position: center center; background-repeat: no-repeat; background-size: cover;}
body.archive.term-rum .taxonomy-header {background-image:url(/wp-content/uploads//category-rum.jpg)}