{CODICTS} Snippets is now available

MyListing Sold Status

The {CODICTS} MyListing Sold Status plugin adds a customizable “Sold” status to MyListing listings. Site owners and listing authors can mark individual listings as sold or not sold from both the frontend user dashboard and the WordPress admin area. Sold listings are visually dimmed on preview cards with reduced opacity and a grayscale image filter.

The feature is configured on a per-listing-type basis — you choose which listing types support the sold status via a dedicated settings page. Once enabled, users can toggle the sold state from their dashboard, and admins can do the same from the admin listings table (including bulk actions).

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, navigate to the “Sold Status” settings page in the WordPress admin sidebar and enable the feature for your desired listing types.

Note: If the MyListing theme is not detected, an admin error notice will appear and all functionality is disabled.


Key Features

FeatureDescription
Per-Listing-Type ConfigurationEnable or disable the sold status independently for each listing type.
User Dashboard ToggleListing authors can mark their published listings as sold or not sold from their My Listings dashboard.
Admin Area ToggleAdmins can toggle sold status via row actions in the WordPress admin listings table.
Bulk ActionsMark multiple listings as sold or not sold simultaneously from the admin area.
ShortcodeA [codicts-sold-status] shortcode displays the sold status text and applies the visual treatment on preview cards.
Preview Card Visual TreatmentSold listings are visually dimmed (50% opacity) with a grayscale background image on preview cards.
Add Listing Form IntegrationAdd a checkbox field with the key codicts_sold_key to let users control sold status when creating or editing listings.
Preview Card Cache RefreshAutomatically refreshes MyListing’s preview card cache when the sold status changes.
Translation ReadyFull internationalization support with a .pot file included.

Settings Page

After activation, a new “Sold Status” menu item appears in the WordPress admin sidebar (with the CoDicts icon).

The settings page has two sections:

Usage Instructions — Displays the field key, shortcode, attributes, and a full usage example for reference.

Listing Types — Lists all registered MyListing listing types, each with an “Enabled?” checkbox. Only listing types that are checked will display the sold/not-sold toggle actions.

Check the listing types you want to enable, then click “Save Changes”.


Managing Sold Status from the User Dashboard

Listing authors can toggle the sold status directly from the frontend:

1. Navigate to My Account → My Listings.

2. For each published listing that belongs to an enabled listing type, an action button appears:

Current StateButton ShowsWhat Happens When Clicked
Not Sold“Not Sold” with dolly iconMarks the listing as sold.
Sold“Sold” with flatbed dolly iconMarks the listing as not sold.

3. After clicking, a confirmation message appears: “{Listing Name} has been marked as sold” (or “not sold”).

The preview card cache is automatically refreshed so the visual change appears immediately.

Note: The toggle only appears for published listings. Draft, pending, or expired listings will not show the action button.


Managing Sold Status from the Admin Area

Individual Listings (Row Actions)

1. Navigate to WP Admin → Job Listings.

2. Hover over a published listing that belongs to an enabled listing type.

3. A row action link appears:

Current StateLink ShowsWhat Happens When Clicked
Not Sold“Not Sold”Marks the listing as sold.
Sold“Sold”Marks the listing as not sold.

Bulk Actions

1. Navigate to WP Admin → Job Listings.

2. Select multiple listings using the checkboxes.

3. From the Bulk Actions dropdown, choose “Sold” or “Not Sold”.

4. Click Apply.

The page refreshes with a count of updated listings. The preview card cache is refreshed for each listing.

Note: Bulk actions require the edit_others_posts capability (typically administrators and editors).


Using the Shortcode

The [codicts-sold-status] shortcode displays the sold status text and applies the visual treatment (dimming and grayscale) to preview cards.

Shortcode Attributes

AttributeRequiredDefaultDescription
idNoCurrent post IDThe listing ID to check.
textNo“Sold”The text displayed when the listing is sold.

Examples

UsageDescription
[codicts-sold-status]Shows “Sold” for the current listing if it is sold.
[codicts-sold-status text="Unavailable"]Shows “Unavailable” instead of “Sold”.
[codicts-sold-status id="123"]Checks listing ID 123.
[codicts-sold-status id="[[:id]]" text="Sold"]Uses MyListing’s dynamic [[:id]] tag — recommended for templates and preview cards.

How the Shortcode Works

When the listing is sold, the shortcode outputs the sold text (e.g., “Sold”) plus a small inline script that applies the preview card visual treatment: 50% opacity on the entire card and a grayscale filter on the background image.

When the listing is not sold, the shortcode outputs nothing (empty string).


Using the Field Key in Add Listing Forms

To allow users to control the sold status directly from the add listing form (when creating or editing a listing):

1. Open the MyListing Type Editor for the desired listing type.

2. In the Form tab, add a new Checkbox field.

3. Set the field key to: codicts_sold_key

4. Save the listing type.

When users create or edit a listing, they can check or uncheck this field to control the sold status. MyListing automatically stores the value, and the sold visual treatment is applied accordingly.

Tip: This is optional. The sold status can also be managed entirely from the user dashboard or admin area without adding this field to the listing form.


Preview Card Visual Treatment

When a listing is marked as sold and the [codicts-sold-status] shortcode is placed in the listing’s preview card template, the following visual effects are applied:

EffectDescription
Reduced opacityThe entire preview card is dimmed to 50% opacity.
Grayscale backgroundThe card’s background image is converted to grayscale.

These effects are applied client-side via JavaScript after the page loads. If a listing is not sold, no visual changes are made.

Important: The visual treatment only works when the [codicts-sold-status] shortcode is placed in the listing’s preview card template or widget. Without the shortcode, sold listings will appear the same as non-sold listings on preview cards.


Example Setup

Here’s a complete example for adding sold status to a “Property” listing type:

1. Go to Sold Status in the admin sidebar.

2. Find “Property” in the listing types list and check the “Enabled?” checkbox.

3. Click “Save Changes”.

4. In the MyListing Type Editor for “Property,” go to the Preview Card settings.

5. Add the shortcode to the preview card where you want the “Sold” text to appear:

[codicts-sold-status id="[[:id]]" text="Sold"]

6. Optionally, add a Checkbox field to the listing type’s form with the key codicts_sold_key so users can mark listings as sold when creating or editing them.

Now property owners can toggle the sold status from their My Listings dashboard, and sold properties will appear dimmed with a grayscale background on preview cards.


Frequently Asked Questions

Do I need a child theme?

No. This plugin works with both the parent MyListing theme and a child theme. It does not copy any template files.

Where is the settings page?

After activation, a top-level menu item called “Sold Status” appears in the WordPress admin sidebar. Click it to enable the feature for your listing types.

Can users mark their own listings as sold from the frontend?

Yes. If the listing type has sold status enabled in the settings, users will see a sold/not-sold toggle action in their My Account → My Listings dashboard for published listings.

Can I mark multiple listings as sold at once?

Yes. In the WordPress admin Job Listings screen, select listings using checkboxes, choose “Sold” or “Not Sold” from the Bulk Actions dropdown, and click Apply.

What does a sold listing look like?

Sold listings are visually dimmed on preview cards: the card drops to 50% opacity and the background image becomes grayscale. This requires the [codicts-sold-status] shortcode to be placed in the preview card template.

Can I customize the “Sold” text?

Yes. Use the text attribute: [codicts-sold-status text="Unavailable"] or any other text you prefer.

Can users control the sold status from the add listing form?

Yes. Add a Checkbox field to the listing type’s form with the key codicts_sold_key. Users can then check or uncheck it when creating or editing a listing. This is optional — the dashboard and admin toggles work independently.

Does the sold status affect SEO or listing visibility?

No. The sold status is purely visual. It does not change the listing’s publish status, exclude it from search results, or affect indexing. The listing remains fully accessible and visible.

Why don’t I see the toggle on a listing?

The toggle only appears when all three conditions are met: the listing type is enabled in the plugin settings, the listing status is “publish,” and the user is viewing the correct dashboard or admin page. Draft, pending, or expired listings will not show the toggle.

Why isn’t the visual treatment showing on preview cards?

The [codicts-sold-status] shortcode must be placed in the listing’s preview card template for the visual effects to apply. Without the shortcode, sold listings will look the same as non-sold listings on cards.


Troubleshooting

Sold/Not Sold Toggle Not Appearing on User Dashboard

CauseSolution
Listing type not enabledGo to the Sold Status settings page and check the “Enabled?” checkbox for the listing type. Click Save Changes.
Listing is not publishedThe toggle only appears for listings with a “publish” status. Draft, pending, or expired listings are excluded.
Plugin not activatedGo to Plugins → Installed Plugins and verify the plugin is active.

Sold/Not Sold Row Action Not Showing in Admin

CauseSolution
Hidden by defaultRow actions in the admin listings table are hidden by default and only appear when you hover over a listing row. This is standard WordPress behavior.
Listing type not enabledVerify the listing type is enabled in the Sold Status settings.
Listing not publishedThe row action only appears for published listings.

Preview Card Not Showing Sold Visual Effect

CauseSolution
Shortcode not placedThe [codicts-sold-status] shortcode must be in the listing’s preview card template for the visual treatment to apply. Add it to the appropriate template or widget.
Wrong shortcode formatUse [codicts-sold-status id="[[:id]]" text="Sold"] with the [[:id]] dynamic tag for preview cards.
JavaScript disabledThe visual effects are applied client-side via JavaScript. If JavaScript is disabled in the browser, sold listings will appear the same as non-sold listings.
Cached preview cardIf the sold status was changed directly via the database or the add listing form checkbox, the preview card cache may not have been refreshed. The cache will update naturally over time, or you can toggle the status from the dashboard or admin to force a cache refresh.

Bulk Actions Not Working

CauseSolution
Insufficient permissionsBulk actions require the edit_others_posts capability. Ensure the user has an Administrator or Editor role.

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

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