Only show main categories and not sub-categories

Hi there!

On the account page under listings I would like to only show the main category of a listing and not also the sub-category. Could you please provide a code snipped (or tell me which line I have to remove in a template) to remove the sub-category?

I attached a screenshot of the thing that I’m talking about. Unfortunately on your demo you have no sub categories so they are not displayed in that table obviously, but if you had one than they would be there.

Thank you!

Sorry, there’s no simple code snippet for this, this requires overriding the listing/view/block/listing-categories.php template part. We plan to replace these with breadcrumbs to show the full category path since child categories may not indicate the parent category context clearly.

1 Like

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