Hi, currently this is not really possible i am afraid, at least not without modifying the original WPAdverts source code.
In the next release i will introduce an additional filter in the file upload and then it will be possible to automatically set a category for uploaded files.
I created a ticket for this issue at GitHub https://github.com/simpliko/wpadverts/issues/62
That’s great. We will probably be purchasing the full version soon and look forward to getting the updates. Is there also a way that we can make it required to choose a category when an ad is created?
Thanks!
Julie
Yes, it is possible, you can do it either using Custom Fields extension or by adding the code below in your theme functions.php file
add_filter( "adverts_form_load", "_adverts_add_category_required" );
function _adverts_add_category_required( $form ) {
if( $form['name'] != "advert" ) {
return $form;
}
foreach( $form["field"] as $key => $field ) {
if( $field["name"] == "advert_category" ) {
$form["field"][$key]["is_required"] = true;
$form["field"][$key]["validator"][] = array( "name" => "is_required" );
}
}
return $form;
}