Support » Plugin: WPAdverts - Classifieds Plugin » Hide the ‘Account’ section

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

    (@gwin)

    Hi,
    you can hide the Account field either using the Custom Fields extension or by adding the code below in your theme functions.php file

    
    add_filter( "adverts_form_load", "hide_adverts_account_field" );
    function hide_adverts_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 1 replies (of 1 total)
  • You must be logged in to reply to this topic.