MyListing Quick Add Listing
The {CODICTS} MyListing Quick Add Listing plugin provides a streamlined popup or inline form for adding new listings without navigating to the full add-listing page. Users can quickly fill in selected fields and submit listings from any page on the site via a shortcode-powered button or embedded form.
The plugin integrates with MyListing’s listing type system, field definitions, and submission pipeline. It supports guest submissions (with session-based persistence until login), promotion package selection after submission, configurable success actions, and per-listing-type field selection with drag-and-drop ordering.
Installation & Activation
Start by downloading the plugin from the Downloads page on your dashboard on the CoDicts website.
After downloading, install and activate the plugin in WordPress by navigating to “Plugins” > “Add New” > “Upload Plugin” and selecting the downloaded zip file. Click “Install Now” and then “Activate”.
After activation, a new “Quick Add Listing” menu item appears in the WordPress admin sidebar. Configure your listing types, fields, and settings from there, then add the shortcode to any page to display the quick add form.
Note: If the MyListing theme is not detected, an admin error notice is shown and all functionality is disabled.
Key Features
| Feature | Description |
|---|---|
| Popup Quick Add Form | A modal popup with selected listing fields for rapid listing creation from any page. |
| Inline Form | Embed the form directly in the page content without a popup. |
| Per-Listing-Type Configuration | Each listing type can be independently enabled with its own field selection, labels, and settings. |
| Drag-and-Drop Field Ordering | Reorder fields in the admin settings with drag-and-drop. |
| Custom Field Labels | Override default field labels for the quick add form. |
| Guest Submission Support | Guests fill out the form; data is saved in a session and applied after they log in or register. |
| Promotion Package Selection | After submission, users can select and purchase promotion packages for their new listing. |
| Configurable Success Actions | Show a notification, redirect to the listing, or display a custom Elementor template on success. |
| Custom Button Integration | Trigger the popup from any custom button using CSS classes. |
| MyListing Field Compatibility | Uses MyListing’s own form field templates for full field-type support. |
How It Works
1. You configure which listing types and fields are available in the admin settings page.
2. You place the shortcode on any page — it renders either a popup button or an inline form.
3. Users fill in the selected fields and click Submit.
4. The listing is created via AJAX (no page reload). The user then sees a success notification, is redirected to the listing, or is shown a promotion package selection step — depending on your configuration.
For guests, the form data is saved to a PHP session. After the guest logs in or registers, the listing is automatically created with them as the author.
Admin Settings Page
After activation, navigate to “Quick Add Listing” in the WordPress admin sidebar.
The settings page displays all registered MyListing listing types as collapsible accordion sections. Each listing type can be independently configured with the following settings:
| Setting | Description |
|---|---|
| Enable/Disable Toggle | Enables or disables the quick add form for this listing type. |
| Popup Title | The title displayed at the top of the popup or inline form. |
| Button Text | The label on the trigger button (default: “Add a {Listing Type Name}”). |
| Submit Button Text | The label on the form’s submit button (default: “Submit”). |
| Success Template (Inline) | What happens after successful submission (see Success Actions below). |
| Success Page For Guest (Redirect) | Where guests are redirected after login and listing creation. |
| Fields Setup | Select which fields to include and customize their labels, with drag-and-drop ordering. |
Important: Quick Add Listing does not currently support paid listing packages (WooCommerce listing packages). However, it does support promotion packages (featured/promoted listings) after submission.
Fields Setup
In each listing type’s settings, the Fields Setup section displays all fields defined in that listing type as draggable items.
Each field has:
— A drag handle (dots icon) for reordering fields by dragging and dropping.
— A text input for overriding the field label. The placeholder shows the original field name and key for reference.
— A checkbox to enable or disable the field in the quick add form.
Enabled fields appear at the top of the list; remaining fields appear below. Reorder fields by dragging them to change the order they appear on the form.
The following structural field types are automatically excluded and cannot be added to the quick add form: form-heading, ui-step, ui-heading, and form-wizard.
Success Actions
The “Success Template” dropdown controls what happens after a listing is successfully submitted:
| Option | Logged-In User | Guest User |
|---|---|---|
| Default success notification | A toast notification appears and the popup closes. | Redirected to login; listing created after login; no further redirect. |
| Redirect to listing | Browser redirects to the new listing’s URL. | Redirected to login; listing created after login; then redirected to the listing. |
| Elementor section template | The popup switches to a “package” step showing the selected template (ideal for promotion package selection). | Redirected to login; listing created after login; then redirected to the configured guest page. |
The “Success Page For Guest” dropdown controls where guests are redirected after they log in and their listing is created:
| Option | Behavior |
|---|---|
| Default success notification | No special redirect after guest login. |
| Redirect to listing | Redirects to the newly created listing. |
| A specific WordPress page | Redirects to the selected page. |
Shortcode Usage
The plugin provides one shortcode: [codicts-mylisting-quick-add-listing]
Standard Popup Button
[codicts-mylisting-quick-add-listing post_type="your-listing-type"]
Renders a button that, when clicked, opens a popup with the quick add form.
Inline Form (No Popup)
[codicts-mylisting-quick-add-listing display="inline" post_type="your-listing-type"]
Renders the form directly in the page content — no popup, no button.
Hidden Button (Custom Trigger)
[codicts-mylisting-quick-add-listing is_hidden="true" post_type="your-listing-type"]
Renders the popup form in the page but hides the default trigger button. Use this with a custom button that has the appropriate CSS classes (see Custom Button Integration below).
Shortcode Attributes
| Attribute | Default | Description |
|---|---|---|
| post_type | (required) | The listing type slug. Must match a listing type enabled in the settings. |
| display | “popup” | Set to "inline" to embed the form directly instead of using a popup. |
| is_hidden | “false” | Set to "true" to hide the trigger button (use with custom button triggers). |
Multiple Forms on One Page
You can place multiple shortcodes with different post_type values on the same page. Each form is scoped to its listing type.
Custom Button Integration
To trigger the popup from a custom button (for example, an Elementor button widget), add the following CSS classes to the button:
cmlqal-popup-button cmlqal-type-{listing-type-slug}
For example, for a listing type with slug business:
cmlqal-popup-button cmlqal-type-business
The JavaScript detects the cmlqal-type- prefix and extracts the listing type slug to open the correct popup.
Important: You must also place the shortcode with
is_hidden="true"somewhere on the same page so the popup form is rendered in the DOM. The custom button only triggers the popup — the shortcode renders the actual form.
Guest Submissions
If MyListing’s “Require account to submit listings” setting is disabled, guests can use the quick add form:
1. The guest fills out the form and clicks Submit.
2. The form data is saved to a PHP session on the server.
3. The guest is redirected to the WooCommerce My Account page to log in or register.
4. After login or registration, the plugin automatically retrieves the saved form data and creates the listing with the user as the author.
5. The user is redirected based on the “Success Page For Guest” setting.
Note: Only one pending guest submission can be stored at a time. A new submission overwrites any existing session data. The session data is cleared immediately after processing, whether successful or not.
Promotion Package Selection
After a listing is submitted, you can offer promotion packages using an Elementor template as the success step.
Setup
1. Create an Elementor Section template containing the promotion package shortcode:
[codicts-mylisting-quick-add-listing promote-package]
2. In the plugin settings, set the “Success Template” for the listing type to your Elementor section template.
3. After a user submits a listing, the popup switches from the form to the promotion selection step.
What the Promotion UI Displays
| Section | Description |
|---|---|
| Free plan | Always shown first. Displays the current (free) plan with a price of $0.00 and a “Current plan” label. |
| Available promotion products | Lists all published WooCommerce promotion_package products that are purchasable and have a duration greater than 0. Each shows the product name, price, duration in days, and an “Upgrade” button that starts the purchase flow. |
| Owned packages | Lists any unused promotion packages the current user already owns. Each shows the product name, price, duration, and a “Use” button that applies the promotion directly without purchasing. |
Clicking “Upgrade” redirects to the WooCommerce checkout. Clicking “Use” applies the owned promotion package to the newly created listing immediately.
Example Setup
Here’s a complete example for a “Business” listing type:
1. Go to Quick Add Listing in the admin sidebar.
2. Expand the “Business” accordion and enable it with the toggle.
3. Set the Popup Title to “Add Your Business.”
4. Set the Button Text to “Quick Add Business.”
5. In Fields Setup, enable the fields you want on the quick form: “Job Title”, “Job Description”, “Location”, “Phone”, and “Cover Image”. Drag them into your preferred order. Optionally override labels (e.g., change “Job Title” to “Business Name”).
6. Set Success Template to “Redirect to listing.”
7. Set Success Page For Guest to “Redirect to listing.”
8. Click Save Changes.
9. Add the shortcode to your desired page:
[codicts-mylisting-quick-add-listing post_type="business"]
Now visitors see a “Quick Add Business” button. Clicking it opens a popup with only the five selected fields. After submission, they’re redirected to their new listing page.
Developer Hooks
The plugin provides hooks for developers who need to customize the listing creation process:
| Hook | Type | Description |
|---|---|---|
codicts-mylisting-quick-add-listing::title_modifier | Filter | Modify the listing title before saving. Receives the title string, returns the modified title. |
codicts-mylisting-quick-add-listing::after-pending-published | Action | Fires after a guest’s listing is created post-login. Provides $user_id and $job_id. |
mylisting/submission/save-listing-data | Action | Fires after listing creation for custom data handling (standard MyListing hook). |
mylisting/submission/done | Action | Fires when submission is complete (standard MyListing hook). |
Frequently Asked Questions
Do I need a child theme?
No. This plugin does not require a child theme. It works directly with MyListing’s APIs and template system without copying any template files.
Can guests submit listings?
Yes, if MyListing’s “Require account to submit listings” setting is disabled. Guests fill out the form, and their data is saved in a PHP session until they log in or register, at which point the listing is automatically created.
Does this support paid listing packages?
No. The plugin does not integrate with MyListing’s WooCommerce paid listing package system. However, it does support promotion packages (featured/promoted listings) after submission via the promote-package shortcode.
Can I use this with custom buttons?
Yes. Add the CSS classes cmlqal-popup-button cmlqal-type-{listing-type-slug} to any button element (e.g., an Elementor button). You must also place the shortcode with is_hidden="true" on the same page.
Can I display the form without a popup?
Yes. Use the display="inline" attribute: [codicts-mylisting-quick-add-listing display="inline" post_type="your-type"]
Can I control which fields appear?
Yes. In the admin settings, each listing type has a Fields Setup section where you can enable/disable individual fields, reorder them with drag-and-drop, and override their labels.
What happens after a listing is submitted?
This depends on the “Success Template” setting: default success notification (toast message, popup closes), redirect to listing (browser navigates to the new listing), or an Elementor template (popup switches to show the template, ideal for promotion package selection).
What MyListing field types are supported?
All MyListing field types with form templates are supported, including text, select, term-select, date, texteditor, file, location, checkbox, radio, textarea, wp-editor, links, work-hours, recurring-date, and general-repeater. Structural types (form-heading, ui-step, ui-heading, form-wizard) are excluded automatically.
Can I have multiple quick add forms on the same page?
Yes. Each form is scoped to its listing type. Place multiple shortcodes with different post_type values on the same page.
Can I modify the listing title before it’s saved?
Yes. Use the codicts-mylisting-quick-add-listing::title_modifier filter in your theme’s functions.php or a custom plugin to modify the title string before it’s saved.
What listing status does the new listing get?
This depends on your MyListing settings. If “Require approval before publishing” is enabled, listings are set to “pending.” If approval is not required, listings are published immediately. The listing expiry date is calculated and set automatically for published listings.
Troubleshooting
Quick Add Button Not Appearing
| Cause | Solution |
|---|---|
| Listing type not enabled | Go to the Quick Add Listing settings and make sure the listing type is enabled with the toggle switch. |
| No fields configured | Enable at least one field in the Fields Setup section for the listing type. |
| Wrong post_type in shortcode | Verify the post_type attribute matches the listing type slug exactly. |
| Plugin not activated | Go to Plugins → Installed Plugins and verify the plugin is active. |
Popup Not Opening from Custom Button
| Cause | Solution |
|---|---|
| Missing hidden shortcode | The shortcode with is_hidden="true" must be on the same page as the custom button. The button triggers the popup; the shortcode renders the form. |
| Wrong CSS classes | Ensure the button has both cmlqal-popup-button and cmlqal-type-{slug} classes. The slug must match the listing type slug exactly. |
Guest Submission Data Lost After Login
| Cause | Solution |
|---|---|
| PHP sessions not supported | The guest flow relies on PHP sessions. Some hosting environments (load-balanced or serverless setups) may not support PHP sessions. Check with your hosting provider. |
| Session overwritten | Only one pending guest submission can be stored at a time. If the guest submitted the form again before logging in, the first submission is overwritten. |
Form Submission Errors
| Cause | Solution |
|---|---|
| Required fields missing | The plugin uses MyListing’s built-in field validation. If required fields are not filled in, error messages appear in a notification toast. Make sure all required fields from the listing type are included in the quick add form. |
| “You must be signed in” message | If MyListing’s “Require account to submit listings” is enabled, guests cannot submit. They must log in first. If you want guest submissions, disable that MyListing setting. |
Promotion Packages Not Appearing
| Cause | Solution |
|---|---|
| No Elementor template set | The promotion UI only shows when a Success Template (Elementor section) is configured. Set it in the listing type’s settings. |
| No promotion products | Ensure WooCommerce promotion_package products exist, are published, purchasable, and have a duration greater than 0. |
| Shortcode not in template | The Elementor section template must contain [codicts-mylisting-quick-add-listing promote-package] to render the promotion selection UI. |
Complex Fields Not Working Properly in Popup
| Cause | Solution |
|---|---|
| Sub-popup display issues | Complex field types (texteditor, file, location, recurring-date, general-repeater, links, work-hours) open in sub-popups within the main popup. Some complex field interactions may not work perfectly in this constrained context. For best results with complex fields, consider using the inline display mode (display="inline") instead of the popup. |
“MyListing Theme Not Detected” Error
The MyListing theme must be installed and active. Go to Appearance → Themes to verify.
For further support, visit codicts.com or contact us at support@codicts.com.