Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author agentevolution

    (@agentevolution)

    They are added as defaults by the plugin. If you don’t need them, you don’t need to use them.

    Thread Starter reszkov

    (@reszkov)

    well yeah but with mine added, i have quite a list now. But its not somthing bothering me that much. Your plugin is simply best !

    Plugin Author agentevolution

    (@agentevolution)

    With the latest version (v1.1.1) you can remove the defaults by adding a filter function to your theme.

    This will remove all the default status terms. You can remove the ones that you want to keep, if any, from the array:

    add_filter( 'wp_listings_default_status_terms', 'custom_default_status_terms' );
    function custom_default_status_terms() {
    	$status_terms = array('Active' => 'active', 'Pending' => 'pending', 'For Rent' => 'for-rent', 'Sold' => 'sold', 'Featured' => 'featured', 'New' => 'new', 'Reduced' => 'reduced');
    	return $status_terms;
    }
    Thread Starter reszkov

    (@reszkov)

    do i add it to funcions.php of theme ? if so i don’t think it works for me ??

    Plugin Author agentevolution

    (@agentevolution)

    Yes, add it to functions.php.

    My mistake, the code snippet provided keeps all the default terms. If you want to remove them all, then pass an empty array:

    add_filter( 'wp_listings_default_status_terms', 'custom_default_status_terms' );
    function custom_default_status_terms() {
    	$status_terms = array();
    	return $status_terms;
    }
    Thread Starter reszkov

    (@reszkov)

    Yeah, that did it. Thanks a lot ?? could i ask you for the same thing with Property Types

    Would also appreciate a similar filter for Property Types if it doesn’t exist. Actually filters for custom listing text, map embed code, etc would all be appreciated. I don’t want to hack the plugin and break updates, but I also want to make the admin panel as user friendly as possible for the client.

    Thanks for your valuable time. ??

    Plugin Author agentevolution

    (@agentevolution)

    There is already a filter for property types. You can see it in the file class-/includes/taxonomies.php. It’s basically:

    add_filter( 'wp_listings_default_property_type_terms', 'custom_default_property_type_terms' );
    function custom_default_property_type_terms() {
    	$property_type_terms = array();
    	return $property_type_terms;
    }

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘can't remove status’ is closed to new replies.