How to customize the Add Listing form

I am trying to customize “Add listing” form in Rentalhive, but encountered some problems. First I tried to rebuild the form by a template, but I don’t see required blocks and items to do that in the menu. Then I tried to delete some parts on the form by adding custom css, but the problem is that even though I managed to delete “tag” field by “hp-form__field–tags{display:none}”, this approach does not work with other parts of the form. For instance, by using .hp-form__field–textarea {display:none} it deletes textarea everywhere on the form. I would appreciate your advice on either how rebuild the form from scratch or how to use css code to hide specific fields on the form. Please note that my coding skills are very limited.

Hi,

The easiest way to solve this problem is to import the demo content again - How to import RentalHive demo content - HivePress Help Center.

You can ask questions on this forum, and we will try to help you if it is our responsibility.

Also, If customizations are required for your site, please try customizing it using the collection of code snippets Search · user:hivepress · GitHub and other developer resources, or consider hiring someone for custom work https://fvrr.co/32e7LvY

P.S. If you purchased a theme or extension, please enter the license key in the forum profile settings, this will enable the Premium Support badge and ensure a 24-hour turnaround time.

Thank you Andrii. I have found some useful codes, but where should I insert them? it suggests that they should be put in functions.php file, but which one? There are many files with this name in the directory. If I update the theme later do I have to insert these codes again? I am using Rentalhive.

I’ve found functions.php in the theme’s folder and added the following code:

<?php add_filter( 'hivepress/v1/models/listing/attributes', function( $attributes ) { if ( isset( $attributes['price'] ) ) { $attributes['price']['edit_field']['description'] = 'custom text here'; } return $attributes; }, 1000 ); but it gives me the error: "Your PHP code changes were rolled back due to an error on line 8 of file wp-content/themes/rentalhive/functions.php. Please fix and try saving again. syntax error, unexpected '<', expecting end of file" Thank you for your support.

Hi,

If you have made any changes to the theme files, then all changes will be restored to the original ones after updating this theme.
If you need to add any code snippets, please check this tutorial How to add custom code snippets - HivePress Help Center.

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