Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Merv Barrett

    (@mervb1)

    That filter name you are using does not exist.

    epl_listing_meta_property_land_area_unit

    The filter you want to use is

    epl_opts_area_unit_filter

    so to change the default… easy-property-listings/lib/meta-boxes/meta-boxes.php

    // Default
    $opts_area_unit = apply_filters (  'epl_opts_area_unit_filter', array(
    			'square'	=>	__('Square', 'epl'),
    			'squareMeter'	=>	__('Square Meter', 'epl'),
    			'acre'		=>	__('Acre', 'epl'),
    			'hectare'	=>	__('Hectare', 'epl'),
    			'sqft'		=>	__('Square Feet', 'epl')
    		)
    	);

    Use this

    function epl_modify_property_land_area_unit($array) {
        $array = array(
            'acre'        =>   'Acres',
            'sqft'        =>   'Sq.Ft.'
        );
    
        return $array;
    }
    add_filter('epl_opts_area_unit_filter', 'epl_modify_property_land_area_unit');

    Thread Starter D L

    (@damon18)

    Thanks this worked. Not sure where I got the non-existent filter name.

    The only problem I have with this after the change is that filter is used on both land and property. I was making the change with land in mind, but now when adding a house, the default unit for the size of the house is acres. Which is a mighty big house.

    I solved it by removing the area entry from the add property page completely. I think that will be ok because agents here usually don’t want to quote sq. ft. of a building on the site anyway.

    But would there be a way to change the default to sq. ft. for a particular post-type or to make that a hidden value in the form so that the box for the number could just be labeled “Total Sq. Ft.” and no selection for unit.

    Plugin Author Merv Barrett

    (@mervb1)

    Yeah, things need work.

    You can contribute to the core code on github.

    Just let the user select, make the first one :select from below”. A lot of projects are imported directly into the database.

    I neglected the front end user, i’ll work on separating it with another filter.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Changing options in admin select lists’ is closed to new replies.