Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author pragmaticmates

    (@pragmaticmates)

    Plugin Author pragmaticmates

    (@pragmaticmates)

    Thread Starter rwsimon

    (@rwsimon)

    Looking at the taxonomies documentation page, as you suggested, I found this:

    Taxonomies
    Custom taxonomies could be found inside realia/includes/taxonomies folder. Before you start working with taxonomies, make sure that you are familiar with all nuances of register_taxonomy function.

    List of all available custom taxonomies defined by plugin:

    Locations
    Property types
    Statuses
    Amenities
    Materials

    There is any kind of setting, in the taxonomies, linked to the filter RENT / SALE.

    In the plugin main php file, I found this setting defined in constant:

    public function constants() {
    			define( 'REALIA_DIR', plugin_dir_path( __FILE__ ) );
    			define( 'REALIA_PROPERTY_PREFIX', 'property_' );
    			define( 'REALIA_AGENCY_PREFIX', 'agency_' );
    			define( 'REALIA_AGENT_PREFIX', 'agent_' );
    			define( 'REALIA_TRANSACTION_PREFIX', 'transaction_' );
    			define( 'REALIA_PACKAGE_PREFIX', 'user_' );
    			define( 'REALIA_USER_PREFIX', 'user_' );
    			define( 'REALIA_RECAPTCHA_URL', 'https://www.google.com/recaptcha/api/siteverify' );
    <strong>	        define( 'REALIA_CONTRACT_SALE', 'SALE' );
    	        define( 'REALIA_CONTRACT_RENT', 'RENT' );</strong>

    Removing or commenting this constant definition does get any effect. And your suggestion to remove this does not make any sense, since this item is not from a taxonomy.

    If this setting was a real taxonomy, we can just remove it via wordpress admin.

    Plugin Author pragmaticmates

    (@pragmaticmates)

    Hi,

    sorry for that but contract type is not taxonomy anymore. Contract type is a custom field defined via CMB2. Here you can see source code where it is defined

    https://github.com/PragmaticMates/realia/blob/master/includes/post-types/class-realia-post-type-property.php#L121-L130

    If you are familiar with remove_action() you can easily remove fields definition in theme and then just copy & paste almost same code into functions.php without the contract field.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Disable RENT or SALE Contract Type’ is closed to new replies.