Support » Plugin: WPAdverts - Classifieds Plugin » Delete Account Login

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

    (@gwin)

    Hi, yes you can do this by adding the code below to your theme functions.php file

    
    add_filter( "adverts_form_load", "customize_adverts_add" );
    function customize_adverts_add( $form ) {
      if( $form['name'] != "advert" ) {
        return $form;
      }
      foreach( $form["field"] as $key => $field ) {
        if( $field["name"] == " _adverts_account" ) {
            unset( $form["field"][$key] );
        }
      }
      return $form;
    }
    

    it didnt work

    • This reply was modified 2 years, 1 month ago by ShriniKannan.

    Your code worked perfectly, thank you.
    Also couldn’t get Greg’s code to work.

    Plugin Author Greg Winiarski

    (@gwin)

    Hi, sorry there is a typo in the code i sent, please use this one instead

    
    add_filter( "adverts_form_load", "remove_account_field" );
    function remove_account_field( $form ) {
      if( $form['name'] != "advert" ) {
        return $form;
      }
      foreach( $form["field"] as $key => $field ) {
        if( $field["name"] == "_adverts_account" ) {
            unset( $form["field"][$key] );
        }
      }
      return $form;
    }
    
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Delete Account Login’ is closed to new replies.