Support » Plugin: WPAdverts - Classifieds Plugin » Remove line from /add page

  • Resolved xjamasterx

    (@xjamasterx)


    Hi there,

    On the /add page, I’d like to remove the line that says “If you want to use a different account, please logout.” How can I do that?

    I have another button for users to log out, so this line is redundant.

    Thanks for your help!

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

    (@gwin)

    Hi,
    you can do that using Custom Fields extension or by adding the code below in your theme functions.php file

    
    add_filter( "adverts_form_load", "remove_account_from_adverts_add" );
    function remove_account_from_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;
    }
    
Viewing 1 replies (of 1 total)
  • The topic ‘Remove line from /add page’ is closed to new replies.