Display Vendor Category with Link

I have implemented the code below to show the “Vendor category” for each vendor in the Vendors page

However I would like the Vendor categories displayed and function similar to how listing categories are displayed in the Listings page, with a background that changes color on hover and a link to the Vendors Category page when clicked (screenshot for reference)

This seems to have been asked quite a number of times in the past, I am hoping that by now someone has managed to find a solution? Thank you!

Hi,

You can try to wrap the div you added to display the categories using this CSS class: .hp-listing__categories. However, please note that you may also need CSS tweaks, as there is no such element there.

Thanks Andrii.

How can I get the URL for the vendor-category page pls (to link it from the category)?

Please try using this code within the initial code snippet:

get_term_link($category->get_id())

You can find more details here get_term_link() – Function | Developer.WordPress.org

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.