Frontend Submission [Pro]
The frontend submission form lets logged-in members post listings without entering the WordPress admin. This is the heart of a self-service marketplace.
Pro feature. The free theme has no frontend submission — listings are admin-only.
The shortcode
[bc_submit_listing]
Drop this into any page. The WOW Feeder creates /post-a-listing/ with this shortcode pre-filled.
The shortcode renders a multi-step form:
- Category — pick a sub-category. Custom fields adjust to the choice.
- Details — title, description, price, location, condition.
- Photos — drag-drop up to 8 images (configurable).
- Custom fields — category-specific (cars: make/model/year; property: bedrooms/sqft).
- Contact — email, phone (defaults to the user’s profile).
- Package — free or paid (if packages are configured).
- Review & submit — preview before publishing.
Configuration
Classifieds Pro → Settings → Submission:
| Setting | Default | Notes |
|---|---|---|
| Submit page | /post-a-listing/ |
The page with the shortcode. Auto-populates from the WOW Feeder. |
| Require login | On | If off, anonymous users get a “log in to post” prompt. We don’t recommend turning this off — anonymous listings are a spam magnet. |
| Require approval | Off | If on, all submissions go to Pending status. Review at Classifieds Pro → Pending Listings. |
| Max images per listing | 8 | 1–12 supported. More than 8 makes the form heavy. |
| Max image size (MB) | 5 | Server upload limit overrides this if lower. |
| Allowed image formats | JPG, PNG, WebP | HEIC support coming soon. |
| Max title length | 80 | Spam preventer. |
| Min description length | 50 | Quality preventer. |
What sellers see
The form is mobile-friendly with touch-sized inputs and a clear progress indicator.
Categories drive the form
Picking a category in step 1 changes:
- Which custom fields appear in step 4 (cars get make/model/year/mileage; jobs get salary/employment/remote)
- Whether photos are required (services and jobs are usually fine without)
- Which package options are shown (some categories may have category-only packages)
Categories are configured at Classifieds Pro → Settings → Categories. Each row controls:
| Column | Purpose |
|---|---|
| Slug | Matches the WP category slug |
| Custom fields | Which fields show in the form for this category |
| Photo required | If on, listings without photos can’t be submitted |
| Default package | Pre-selected on submission |
Submission flow
Validation
Server-side validation runs even if the JS is bypassed. Required fields, length limits, file types, image dimensions are all checked. Validation errors return as inline messages above each field, plus a summary banner at the top of the form.
To add custom validation rules:
add_filter( 'best_classifieds_submission_validate', function( $errors, $data ) {
// Block listings priced under $1
if ( ! empty( $data['_bc_price'] ) && (float) $data['_bc_price'] < 1 ) {
$errors['_bc_price'] = 'Price must be at least $1.';
}
// Block listings with no contact info
if ( empty( $data['_bc_contact_email'] ) && empty( $data['_bc_contact_phone'] ) ) {
$errors['_bc_contact_email'] = 'Provide at least one contact method.';
}
return $errors;
}, 10, 2 );
Pre-publish hooks
Inject your own logic before/after the listing is created:
// Modify post args before insert
add_filter( 'best_classifieds_submission_post_args', function( $args, $data ) {
// Auto-add a tag based on a custom field
$args['tax_input']['post_tag'] = array( 'frontend-submitted' );
return $args;
}, 10, 2 );
// React after a successful submission
add_action( 'best_classifieds_after_submission', function( $post_id, $data ) {
// Send a Slack notification
wp_remote_post( 'https://hooks.slack.com/...', array(
'body' => json_encode( array( 'text' => 'New listing: ' . get_the_title( $post_id ) ) ),
) );
}, 10, 2 );
Spam protection
Three layers (all on by default):
- Honeypot field — hidden from real users, bots fill it. Submissions with a non-empty honeypot are silently discarded.
- Time-trap — minimum 3 seconds between page load and submit. Bots fail this.
- Rate limiting — same IP can submit at most 5 listings per hour. Configurable.
For sites under heavy spam pressure, plug in:
- Akismet — set the API key in WP General settings; submissions are automatically checked.
- hCaptcha — install the plugin, the form auto-detects and adds the challenge.
- Cloudflare Turnstile — same.
Editing existing listings
Members edit from their dashboard ([bc_dashboard] → “My listings” → click “Edit”). The submission form re-opens pre-populated with the existing data.
To prevent edits to certain fields after publish:
add_filter( 'best_classifieds_submission_locked_fields', function( $locked, $post_id ) {
// Lock category and price after publish
return array_merge( $locked, array( 'category', '_bc_price' ) );
}, 10, 2 );