{CODICTS} Snippets is now available

MyListing Add Listings Better Authentication

The {CODICTS} MyListing Add Listings Better Authentication plugin enhances the Add Listing page for guest (non-logged-in) users by embedding login and registration forms directly within the listing submission page. Instead of redirecting guests to a separate login page, the authentication forms appear inline — and login or registration is handled via AJAX without any page reload. Once authenticated, the listing form is automatically submitted.

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”.

On activation, the plugin automatically copies enhanced template files into your child theme directory. The inline authentication forms will immediately appear on all Add Listing pages for non-logged-in users.

No settings page: This plugin has no configuration page. It works automatically once activated — no setup required.

Important: The MyListing theme, a MyListing child theme, and WooCommerce must all be active. If any dependency is missing, an admin error notice will appear and functionality is disabled.


Key Features

FeatureDescription
Inline AuthenticationLogin and registration forms appear directly on the Add Listing page as a form section — no redirect to the My Account page.
AJAX LoginLogin is processed without a page reload. On success, the listing form is automatically submitted.
AJAX RegistrationRegistration uses WooCommerce’s native flow via AJAX, including auto-generated username/password support.
reCAPTCHA SupportFully supports MyListing’s login and registration reCAPTCHA settings.
User Role SelectionSupports MyListing’s secondary user role system — users can choose their role during registration.
Custom Registration FieldsRenders all MyListing custom registration form fields for both primary and secondary roles.
Paid Listings CompatibilityWorks with paid listing types by allowing the form to be visible to guests while requiring authentication before submission.
Social Login CompatibilityFires all standard WooCommerce and MyListing authentication hooks, so social login plugins render correctly.

How It Works

By default, MyListing redirects non-logged-in users to the WooCommerce My Account page (or a custom login page) before they can submit a listing. This plugin changes that behavior:

1. A guest visits the Add Listing page. The listing form fields are visible — the guest can browse and fill in the form.

2. An “Account” section appears within the form with “Sign in” and “Register” tabs. The guest fills in their listing details and their authentication credentials on the same page.

3. When the guest clicks the submit button, the plugin handles authentication via AJAX first — no page reload.

4. If authentication succeeds, the Account section is removed from the page and the listing form is automatically submitted.

5. If authentication fails, error messages appear inline within the Account section. The reCAPTCHA (if enabled) is reset, and the page scrolls to the error. The listing form is not submitted.

Note: The submit button is only visible to logged-in users. Guests see the form fields and the Account section, but the submit button appears only after successful authentication.


Login

The “Sign in” tab displays a login form with:

FieldDescription
UsernameUsername or email address.
PasswordAccount password.
Remember meOptional checkbox to stay logged in.
reCAPTCHADisplayed if MyListing’s login captcha setting is enabled.

A “Forgot password?” link is also included, pointing to WordPress’s password recovery page.

On successful login, the Account section disappears and the listing form submits automatically.


Registration

The “Register” tab is shown when WooCommerce registration is enabled. It displays a registration form that mirrors MyListing’s native registration, including:

FieldDescription
EmailRequired email address for the new account.
UsernameShown if WooCommerce’s “generate username” setting is disabled.
PasswordShown if WooCommerce’s “generate password” setting is disabled.
User role selectionShown if MyListing’s secondary user role system is enabled. Users choose between primary and secondary roles via radio buttons.
Custom registration fieldsAll MyListing custom registration fields for each role (text inputs, file uploads like profile pictures, etc.).
reCAPTCHADisplayed if MyListing’s registration captcha setting is enabled.

The registration uses WooCommerce’s native account creation process. On successful registration, the user is logged in immediately and the listing form submits automatically.


When paid listings are enabled in MyListing, the theme normally forces the “Account required for listing submission” setting to true and hides the listing form from guests entirely. This plugin removes that restriction so the form fields remain visible to guests, while the inline Account section ensures users are authenticated before they can submit.

The plugin also includes an admin script that decouples the “Account Required” checkbox from the paid listings toggle in MyListing’s settings. This means you can independently control whether an account is required, even when paid listings are enabled.


Template File Management

The plugin copies four template files into your child theme:

TemplatePurpose
submit-form.phpOverrides MyListing’s listing submission form to include the inline auth section and keep form fields visible to guests.
codicts-auth.phpRenders the inline Account section with Sign in / Register tabs.
codicts-login-form.phpThe login form partial with username, password, remember me, and reCAPTCHA.
codicts-register-form.phpThe registration form partial with email, username, password, role selection, custom fields, and reCAPTCHA.
EventWhat Happens
Plugin activationTemplates are copied to the child theme.
Plugin updateTemplates are force-reinstalled (overwrites existing files).
Plugin deactivationTemplates are deleted from the child theme. The Add Listing page reverts to MyListing’s default behavior (redirect to login page).
Theme switchTemplate tracking is reset and re-evaluated on the next page load.

No data is lost: Deactivating the plugin only removes template files — no user data or listings are affected. Reactivating restores the inline authentication immediately.

Template overwrite warning: If you manually customize any of these template files in your child theme, your changes will be overwritten when the plugin is updated or reactivated.


Frequently Asked Questions

Is there a settings page?

No. The plugin works automatically once activated. The inline login/register forms appear on all Add Listing pages for non-logged-in users with no configuration needed.

Does this require a child theme?

Yes. A MyListing child theme is required because the plugin copies enhanced template files to the child theme directory.

Does this require WooCommerce?

Yes. The plugin uses WooCommerce functions for user registration, authentication cookies, and the notice system.

What happens when I deactivate the plugin?

All copied template files are removed from the child theme, and the Add Listing page reverts to MyListing’s default behavior — redirecting guests to the login page. No user data is lost. Reactivating the plugin re-installs the templates.

Will my custom template modifications be preserved?

No. Plugin activation and version updates force-overwrite the template files. If you customize these templates, be aware that updates will overwrite your changes.

Does the plugin support reCAPTCHA?

Yes. It fully supports MyListing’s login and registration reCAPTCHA settings. If captcha is enabled in MyListing’s role settings, it will be displayed and validated before authentication. On failure, the reCAPTCHA widget is automatically reset.

Can users register with custom roles?

Yes. If MyListing’s secondary user role system is enabled, the registration form shows role selection radio buttons and all custom fields configured for each role.

Does the login form support “Remember Me”?

Yes. The login form includes a “Remember me” checkbox.

What happens if authentication fails?

Error messages appear inline within the Account section using WooCommerce’s notice format. The reCAPTCHA (if present) is reset, and the page scrolls to the error. The listing form is not submitted.

Does the plugin work with social login buttons?

Yes. The inline auth forms fire all standard WooCommerce and MyListing authentication hooks, so social login plugins (Google, Facebook, etc.) that hook into these actions will render their buttons correctly.

How does this work with paid listing types?

When paid listings are enabled, the plugin removes the restriction that hides the form from guests. The listing form fields are visible for guests to browse and fill in, but the submit button only appears after successful authentication via the inline Account section.

Can I still independently control the “Account Required” setting?

Yes. The plugin decouples the “Account required for listing submission” checkbox from the paid listings toggle in MyListing’s admin settings, so you can control them independently.


Troubleshooting

Inline Auth Forms Not Appearing on the Add Listing Page

CauseSolution
Plugin not activatedGo to Plugins → Installed Plugins and verify the plugin is active.
Templates not installedDeactivate and reactivate the plugin to force-reinstall templates.
User is already logged inThe Account section only appears for non-logged-in users. It is completely skipped for logged-in users. Log out to test.
Child theme not activeTemplates can only be installed into a child theme. Ensure a MyListing child theme is active at Appearance → Themes.

Login or Registration Fails with No Error Message

CauseSolution
JavaScript errorCheck the browser console (F12 → Console) for errors. The AJAX authentication requires jQuery and MyListing’s scripts to be loaded.
WooCommerce not activeThe plugin requires WooCommerce for registration and authentication. Ensure WooCommerce is installed and active.
Nonce expiredIf the page has been open for a long time, the nonce may have expired. Refresh the page and try again.

reCAPTCHA Not Showing or Failing

CauseSolution
reCAPTCHA not configuredreCAPTCHA only appears if enabled in MyListing’s role settings. Check your MyListing settings under the Roles section.
reCAPTCHA keys invalidVerify your reCAPTCHA site key and secret key are correct in MyListing’s settings.

Registration Form Not Showing the “Register” Tab

CauseSolution
WooCommerce registration disabledThe Register tab only appears when WooCommerce registration is enabled. Go to WooCommerce → Settings → Accounts & Privacy and check “Allow customers to create an account on the ‘My account’ page.”

Listing Form Still Redirecting to Login Page

CauseSolution
Templates not copiedThe overridden submit-form.php template may not be in the child theme. Deactivate and reactivate the plugin to force template installation.
Another plugin or custom template overridingIf another plugin or a manual template override in your child theme provides its own submit-form.php, it may take precedence. Check for conflicting template files in your child theme’s templates/add-listing/ directory.

“MyListing Theme Not Detected” or “Child Theme Not Detected” Error

Both the MyListing theme and a MyListing child theme must be active. Go to Appearance → Themes to verify. WooCommerce must also be installed and activated at Plugins → Installed Plugins.


For further support, visit codicts.com or contact us at support@codicts.com.

CoDicts Co., Ltd. © 2021-2026. All rights reserved