Category field is missing when I try to create listing

Hello all,

I’m testing making a listing. However, the Complete Profile page comes up and no matter how many times I fill it, it does not save and goes back to being blank after I finish it.

The vendor section has no attributes nor categories, so it cannot be that there is a missing required item (as I saw in similar posts)

Aything I can try?

thank you

I created a new user, passed the “complete profile” page, however I had a problem on the listing one now.

Category field missing ?

Im not sure, I don’t have any categories for vendors. It’s blank.

Hi,

Please clarify: maybe you added a listing through the backend and then tried to edit it through the frontend?

Thank you.

Adding a listing through the backend, do you mean in the Wordpress Dashboard. It’s completely blank if that’s what you mean.

Hi,

Can you please specify if you added a PHP snippet to hide the category field? I don’t see this field on the Add Listing page in your first screenshot. Or did you just delete all categories in Listings > Categories?

I deleted all the categories via listings > categories.

These are the snippets (Additional CSS) I have:

.hp-listing-category__icon {
    display: none !important;
}

body.home  h4.hp-listing-category__name {
    height: 80px;
}

body.home .hp-listing-category__description {
		height: 150px;
}

Hi,

I see. If you don’t have any categories, please use this PHP snippet to avoid the error:

add_filter(
	'hivepress/v1/models/listing',
	function( $args ) {
		$args['fields']['categories']['required'] = false;
		
		return $args;
	},
	1000
);

You can add a PHP snippet using this doc: How to add custom code snippets - HivePress Help Center

​I hope this is helpful to you.

Thank you. I will attemp this at night when the kid is asleep and I have peace :slight_smile: and report back

1 Like

hello. I tried it today, Unfortunately it did not work.

I registered again as a new user but stuck again on complete profile. It just won’t save.

please ignore. I seem to have fixed it.

I just needed to disable Cache Logged-in Users in my cache.

1 Like

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