Viewing 1 replies (of 1 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    You can do this by adding following code in your theme functions.php

    add_filter( "adverts_form_load", "my_adverts_form_remove_fields" );
    function my_adverts_form_remove_fields( $form ) {
        if($form["name"] != "advert") {
            return $form;
        }
    
        $to_remove = array("adverts_price", "adverts_account", "adverts_phone", "adverts_category", "adverts_location");
    
        foreach($form["field"] as $k => $field) {
            if(in_array($field["name"], $to_remove)) {
                unset($form["field"][$k]);
            }
        }
    
        return $form;
    }

    just customize the $to_remove array to remove only the fields you do not want to use.

Viewing 1 replies (of 1 total)

The topic ‘How can I delete standard fields?’ is closed to new replies.