Title: Directory field
Last modified: August 6, 2022

---

# Directory field

 *  Resolved [walid91](https://wordpress.org/support/users/walid91/)
 * (@walid91)
 * [4 years ago](https://wordpress.org/support/topic/directory-field/)
 * Hi,
 * I would like to upgrade my site with a directory.
 * I made a first test and I have a problem with the form.
 * For example, I want to list the different hospitals in the region.
 * I don’t need the price field to be present.
 * I would also like to reorganize the different fields.
 * Is this possible?
 * Thank you.

Viewing 15 replies - 1 through 15 (of 28 total)

1 [2](https://wordpress.org/support/topic/directory-field/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/directory-field/page/2/?output_format=md)

 *  Plugin Support [Muhammad Ali Akbar](https://wordpress.org/support/users/alireyad/)
 * (@alireyad)
 * [4 years ago](https://wordpress.org/support/topic/directory-field/#post-15895228)
 * Yes, we have settings to enable/disable price and also possible to reorganize
   fields but need to customize to reorganize listing form.
 * Thank You
 *  Thread Starter [walid91](https://wordpress.org/support/users/walid91/)
 * (@walid91)
 * [4 years ago](https://wordpress.org/support/topic/directory-field/#post-15895340)
 * Hi,
 * Regarding the deactivation of the price, I think you are referring to settings/
   moderation / Hide form fields / price, am I right?
 * The problem is that I also have a classifieds site and it is impossible to remove
   the price, you understand.
 * So I would like to keep the price for the classifieds ads and remove it for the
   directory.
 * Thank you.
    -  This reply was modified 4 years ago by [walid91](https://wordpress.org/support/users/walid91/).
 *  Plugin Support [Muhammad Ali Akbar](https://wordpress.org/support/users/alireyad/)
 * (@alireyad)
 * [4 years ago](https://wordpress.org/support/topic/directory-field/#post-15895877)
 * Yes, you are right. In that case, you can disable price during post ad [https://prnt.sc/UpA8xaPRmRaw](https://prnt.sc/UpA8xaPRmRaw)
   
   On the other hand, you can disable price for specific ‘Ad Type’ or ‘Category’
   by customize it.
 * Thank You
 *  Thread Starter [walid91](https://wordpress.org/support/users/walid91/)
 * (@walid91)
 * [4 years ago](https://wordpress.org/support/topic/directory-field/#post-15896431)
 * Hi,
 * I don’t want to disable the price for ads, but just for one type of ad.
 * Let’s forget about the classified ads since I don’t want to make any changes.
 * How do I disable the price for an ad type?
 * Thank you for your help.
 *  Plugin Support [Muhammad Ali Akbar](https://wordpress.org/support/users/alireyad/)
 * (@alireyad)
 * [4 years ago](https://wordpress.org/support/topic/directory-field/#post-15896683)
 * You have to override listing from template. Modify this template using child 
   theme plugins\classified-listing\templates\listing-form\information.php
 * Add condition for this ad type in line 54 [https://prnt.sc/mi7vUw5gRQFw](https://prnt.sc/mi7vUw5gRQFw)
 * Thank You
 *  Thread Starter [walid91](https://wordpress.org/support/users/walid91/)
 * (@walid91)
 * [4 years ago](https://wordpress.org/support/topic/directory-field/#post-15897156)
 * Hi,
 * I did several tests with my staging site and it appears a fatal error.
 * Should I put the type of ad or the name of the category instead of “needle”?
 * Please look here:
 * [https://ibb.co/0DdPfp1](https://ibb.co/0DdPfp1)
 * [https://ibb.co/1svy2ZJ](https://ibb.co/1svy2ZJ)
 * [https://ibb.co/CMpTXR9](https://ibb.co/CMpTXR9)
 * Did I make a mistake?
 *  Plugin Support [Muhammad Ali Akbar](https://wordpress.org/support/users/alireyad/)
 * (@alireyad)
 * [4 years ago](https://wordpress.org/support/topic/directory-field/#post-15898410)
 * Yes, you did mistake to write code.
 * First, you have to retrieve ad type using slug then need to add condition. We
   stored ad type in option table.
 * Thank You
 *  Thread Starter [walid91](https://wordpress.org/support/users/walid91/)
 * (@walid91)
 * [4 years ago](https://wordpress.org/support/topic/directory-field/#post-15898507)
 * Hi,
 * I tried but I don’t understand the steps.
 * If you can detail more.
 * I know it may look like customization but it will prevent me from installing 
   another plugin.
 * Thank you.
 *  Plugin Support [Muhammad Ali Akbar](https://wordpress.org/support/users/alireyad/)
 * (@alireyad)
 * [4 years ago](https://wordpress.org/support/topic/directory-field/#post-15899335)
 * Okay. You can target one if category ‘bibi’ exist under ad type ‘bia’
    Will I
   write code to disable price for ad type ‘bia’? [https://ibb.co/0DdPfp1](https://ibb.co/0DdPfp1)
 *  Thread Starter [walid91](https://wordpress.org/support/users/walid91/)
 * (@walid91)
 * [4 years ago](https://wordpress.org/support/topic/directory-field/#post-15900420)
 * Hi,
 * Small precision concerning :
 * > I know it may look like customization but it will prevent me from installing
   > another plugin.
 * This concerns the directory, regarding the classified ads I still use your plugin.
 * > Okay. You can target one if category ‘bibi’ exist under ad type ‘bia’
   >  Will
   > I write code to disable price for ad type ‘bia’? [https://ibb.co/0DdPfp1](https://ibb.co/0DdPfp1)
 * Still not understood, too bad.
 *  Plugin Support [Muhammad Ali Akbar](https://wordpress.org/support/users/alireyad/)
 * (@alireyad)
 * [4 years ago](https://wordpress.org/support/topic/directory-field/#post-15902873)
 * Please, follow below steps to achieve it –
 * 1. Copy this template from plugins/classified-listing/templates/listing-form/
   information.php
    2. Paste it in themes/your-child-theme/classified-listing/information.
   php 3. Replace 54 no line with this [https://codeshare.io/vwp4oL](https://codeshare.io/vwp4oL)
   [https://prnt.sc/_k27T02qgDdh](https://prnt.sc/_k27T02qgDdh)
 * Thank You
    -  This reply was modified 4 years ago by [Muhammad Ali Akbar](https://wordpress.org/support/users/alireyad/).
 *  Thread Starter [walid91](https://wordpress.org/support/users/walid91/)
 * (@walid91)
 * [4 years ago](https://wordpress.org/support/topic/directory-field/#post-15906737)
 * Hi,
 * Indeed, with the code you sent, the price is disabled with a specific category.
 * I had not understood that it was necessary to rewrite the code, something I do
   not have the ability to do.
 * Last question: if I want to add several categories for which I want to deactivate
   the price should I write :
 * >  <?php if ( ‘bia’ , ‘other category’ !== $selected_type && !in_array( ‘price’,
   > $hidden_fields ) ):
 * or
 * >  <?php if ( ‘bia’ !== $selected_type && !in_array( ‘price’, $hidden_fields )):
   > 
   > <?php if ( ‘other category’ !== $selected_type && !in_array( ‘price’, $hidden_fields)):
 * Or neither of them.
 * Thank you.
    -  This reply was modified 4 years ago by [walid91](https://wordpress.org/support/users/walid91/).
 *  Plugin Support [Muhammad Ali Akbar](https://wordpress.org/support/users/alireyad/)
 * (@alireyad)
 * [4 years ago](https://wordpress.org/support/topic/directory-field/#post-15911105)
 * No, your code will not work. You have to know code to do it.
 * It will work for all category which is under ad type ‘bia’, don’t need to modify
   mentioned above code.
 * Thank You
 *  Thread Starter [walid91](https://wordpress.org/support/users/walid91/)
 * (@walid91)
 * [4 years ago](https://wordpress.org/support/topic/directory-field/#post-15911646)
 * Hi,
 * I made a mistake in the question, I meant to say:
 * Last question: if I want to add several **Listing Types
    
   for which I want to
   deactivate the price should I write :
 * > <?php if ( ‘bia’ , ‘**other Listing Types**’ !== $selected_type && !in_array(‘
   > price’, $hidden_fields ) ):
 * or
 * > <?php if ( ‘bia’ !== $selected_type && !in_array( ‘price’, $hidden_fields )):
   > 
   > <?php if ( ‘**other Listing Types**’ !== $selected_type && !in_array( ‘price’,
   > $hidden_fields ) ):
 * Thank you.
    -  This reply was modified 4 years ago by [walid91](https://wordpress.org/support/users/walid91/).
    -  This reply was modified 4 years ago by [walid91](https://wordpress.org/support/users/walid91/).
    -  This reply was modified 4 years ago by [walid91](https://wordpress.org/support/users/walid91/).
    -  This reply was modified 4 years ago by [walid91](https://wordpress.org/support/users/walid91/).
 *  Plugin Support [Muhammad Ali Akbar](https://wordpress.org/support/users/alireyad/)
 * (@alireyad)
 * [4 years ago](https://wordpress.org/support/topic/directory-field/#post-15915910)
 * For multiple types, will write following way [https://codeshare.io/vwp4oL](https://codeshare.io/vwp4oL)(
   see line 4 and 7) [https://prnt.sc/Ir5zvagfgQLE](https://prnt.sc/Ir5zvagfgQLE)
 * Thank You

Viewing 15 replies - 1 through 15 (of 28 total)

1 [2](https://wordpress.org/support/topic/directory-field/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/directory-field/page/2/?output_format=md)

The topic ‘Directory field’ is closed to new replies.

 * ![](https://ps.w.org/classified-listing/assets/icon-256x256.gif?rev=3004059)
 * [Classified Listing – AI-Powered Classified ads & Business Directory](https://wordpress.org/plugins/classified-listing/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/classified-listing/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/classified-listing/)
 * [Active Topics](https://wordpress.org/support/plugin/classified-listing/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/classified-listing/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/classified-listing/reviews/)

 * 28 replies
 * 3 participants
 * Last reply from: [Muhammad Ali Akbar](https://wordpress.org/support/users/alireyad/)
 * Last activity: [3 years, 11 months ago](https://wordpress.org/support/topic/directory-field/page/2/#post-15958011)
 * Status: resolved