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

    (@gwin)

    Currently it is not possible to add such validator in WPAdverts i am afraid.

    Thread Starter themotel16

    (@themotel16)

    So is it impossible to make a validator code that will do just that in the WPAdverts?

    If i cannot make a code is there anyway i can have a parenthesis saying (max posting price cannot exceed $20) next to the Price feature?

    Plugin Author Greg Winiarski

    (@gwin)

    It is possible to write such validator, but this is right now rather complex, and beyond the free support offered here, sorry.

    To add a note below the price field you can add this code to your theme functions.php file

    add_filter( "adverts_form_load", "customize_price_note" );
    
    function customize_price_note( $form ) {
      if( $form['name'] != "advert" ) {
        return $form;
      }
    
      foreach( $form["field"] as $key => $field ) {
        if( $field["name"] == "adverts_price" ) {
            $form["field"][$key]["placeholder"] = "max posting price cannot exceed $20";
        }
      }
    
      return $form;
    }
    Thread Starter themotel16

    (@themotel16)

    That is awesome Greg, thank you so much for your help and time I really appreciate it!

    I understand that the validator I was asking for initially is complex and beyond the free support, however when my website is up and gains more traffic I will be willing to pay you for something like that if you are interested.

    Thanks again for all your help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Post Max Cap Amount’ is closed to new replies.