• Hi, i love your plugin, but I have one important question.

    Is it possible to remove the Registration/Login option from the [adverts_add] Pages, similar to [adverts_manage] where those functions are already disabled?

    Exact class for the element is called “adverts-field-account”. I would like to remove that completely from the template.

    I just want to have anonymus and registration-free page, so when the users want to make an Ad, they don’t see those options at all.

    Best Regards,
    Ivan

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

    (@gwin)

    Hi,

    you should be able to remove the Account field 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;
    }
    Thread Starter ivipivi

    (@ivipivi)

    Sorry for the late response.
    Thank you! It works like a charm.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove Registration from Advert Add Page’ is closed to new replies.