ListingCore

Descripció

ListingCore provides the classified ads functionality for a standalone WordPress classifieds and listing engine. Install this plugin to enable:

  • Custom Post Type — A listing post type with full admin support, REST API, and rich meta fields (price, condition, brand, model, location, contact info, expiry date, and more).
  • Taxonomies — Listing Category (hierarchical) and Listing Tag.
  • User Roleslisting_poster (submits and manages their own listings) and listing_moderator (manages other users’ listings and listing categories).
  • Shortcodes[listingcore_listings], [listingcore_categories], [listingcore_search_form], [listingcore_post_listing_button], [listingcore_user_dashboard], [listingcore_listing_form], [listingcore_contact_form], [listingcore_wishlist].
  • AJAX Handlers — Wishlist toggle, contact seller form submission, live search autocomplete, and load-more listings.
  • Admin Columns — Price, location, status badges, view count, and expiry date columns in the listings list table.
  • Expiry Cron — Daily cron job that emails authors when listings are about to expire (3-day warning) or have expired.
  • REST API — Selected listing fields exposed via the WP REST API (sensitive contact/location fields are capability and privacy gated), plus custom endpoints /wp-json/listingcore/v1/listings and /wp-json/listingcore/v1/listings/{id}/similar.
  • SEO — Product + Offer JSON-LD structured data on published singular listings, and listing inclusion in WordPress’s standard XML sitemap.
  • Single Listing — A plugin-owned fallback single-listing detail template (overridable by your theme), so listings render correctly with any theme.

Shortcode Reference

[listingcore_listings]
Display a grid of listings.
[listingcore_listings cat=»electronics» count=»8″ view=»grid» featured=»1″]

Parameters:
* cat — Category slug or ID (optional)
* count — Number of listings (default: 8)
* viewgrid or list (default: grid)
* featured — Set to 1 to show featured listings only
* location — Exact city name (default: none)
* sortdate, price_asc, price_desc, views (default: date)
* orderASC or DESC (default: DESC). Ignored by price_asc/price_desc, which encode their own direction.

[listingcore_categories]
Display a category grid.
[listingcore_categories count=»8″ columns=»4″ show_count=»yes»]

Parameters:
* count — Number of categories (default: 8)
* columns — Grid columns (default: 4)
* show_count — Show listing count per category: yes or no (default: yes)
* hide_empty — Hide categories with no listings: yes or no (default: no)
* parent — Parent category ID (default: 0, top-level categories only)

[listingcore_search_form]
Display a search form for listings.
[listingcore_search_form placeholder=»Search…» show_cats=»yes» show_loc=»yes»]

[listingcore_post_listing_button]
Display a «Post Ad» button.
[listingcore_post_listing_button text=»Post Free Ad» url=»/submit»]

Parameters:
* text — Button label (default: «Post Free Ad»)
* url — Destination URL (default: the configured submit page)
* class — Additional CSS classes (default: cp-btn cp-btn-accent cp-btn-lg)

[listingcore_user_dashboard]
Embed the user dashboard: the current user’s listings with status, created date, expiry, edit, delete, and renew (for eligible paid listings).

[listingcore_listing_form]
Embed the submit listing form inline on any page.

[listingcore_contact_form]
Embed the contact-seller form for a listing.
[listingcore_contact_form listing_id=»123″]

  • listing_id — Listing ID to contact (optional; defaults to the current listing when placed on a single listing page). Only published listings render the form.

[listingcore_wishlist]
Display the current user’s saved listings.
[listingcore_wishlist]

Requires login. Shows the current user’s saved published listings in saved order, using the standard listing-card presentation.

REST API Endpoints

Selected listing fields are exposed via the REST API; sensitive contact and location fields are capability and privacy gated.

  • GET /wp-json/listingcore/v1/listings — Paginated listing results with filtering by category, location, price range, and featured status.
    • cat — Category slug or ID.
    • location — Exact city match.
    • min_price / max_price — Decimal price range (unpriced listings are excluded from price-range queries).
    • featured — Show featured listings only.
  • GET /wp-json/listingcore/v1/listings/{id}/similar — Similar listings based on category.

Requirements

  • WordPress 6.0 or higher
  • PHP 8.0 or higher

Privacy

ListingCore stores the listing data entered by the listing author (title, description, price, location, condition, and contact details such as phone and email) and each listing’s view count, and stores each user’s saved (wishlist) listings. Listing contact details are not publicly exposed. The contact-seller form emails the visitor’s name, email, phone, and message to the listing author. Paid-listing and expiry events send transactional emails to the listing author. ListingCore does not transmit data to third-party services; if enabled, payment processing is handled by WooCommerce.

Instal·lació

  1. Upload the plugin folder to the /wp-content/plugins/ directory, or install via the WordPress plugin installer by uploading the ZIP file.
  2. Activate the plugin through the Plugins menu in WordPress.
  3. Go to Listings Categories and add your listing categories.
  4. Create pages for your Submit Listing form and User Dashboard, and add the relevant shortcodes ([listingcore_listing_form], [listingcore_user_dashboard]).
  5. Use the shortcodes in any page or post to display listings, categories, and search forms.

PMF

Do I need this plugin to use the ClassiPress Pro theme?

Yes. The theme handles presentation only. This plugin provides the classified ads data layer (post types, taxonomies, roles, shortcodes, and AJAX functionality).

Can I use this plugin with a different theme?

The plugin works independently of the ClassiPress Pro theme. The user dashboard, listing submission and edit forms, contact form, and the single-listing detail page are plugin-owned, and themes can override any of them. The listing post type and all admin features work with any theme.

How do I add icons to listing categories?

Edit any listing category under Listings Categories and enter an emoji or icon character in the «Category Icon» field. This appears in the category grid on the homepage and archive pages.

Are paid listings supported?

Yes. Paid listings run through WooCommerce. Create listing packages (each with a price, duration, and optional Featured/Urgent/Verified flags), map each package to a WooCommerce product, and select a package when submitting a listing.

When a package is selected, the listing is held as pending until the WooCommerce order is completed, at which point the listing is activated and published with its package entitlements. When the paid period ends, the paid entitlements are cleared and the owner can renew the listing (choosing the same or another package). If an order is cancelled or refunded, the paid entitlement is revoked.

WooCommerce is required for paid listings. Free listing submission remains available without WooCommerce and is published immediately.

Authors receive email confirmations for successful payment, successful renewal, cancellation, and refund, in addition to the daily expiry reminders.

How do I set a listing expiry date?

When editing a listing in the WordPress admin, use the Listing Status meta box on the right side to set an expiry date. The plugin’s daily cron job notifies the author 3 days before expiry and again when the listing expires. On natural expiry, a paid listing’s trust entitlements (Featured/Urgent/Verified) are cleared; the listing itself is not automatically unpublished.

Is this plugin translation-ready?

Yes. All strings use the listingcore text domain.

Does this work with Elementor or other page builders?

Yes. The shortcodes work in any page builder. The ClassiPress Pro theme also registers Elementor theme locations (header, footer, single, archive) for full Elementor template builder support.

How do I display the user dashboard?

Create a page and add the shortcode [listingcore_user_dashboard] to its content. Visitors who are not logged in will see a login prompt. Logged-in users see their listings with status, date, expiry, edit, delete, and renew actions.

Ressenyes

No hi ha ressenyes per a aquesta extensió.

Col·laboradors i desenvolupadors

«ListingCore» és programari de codi obert. La següent gent ha col·laborat en aquesta extensió.

Col·laboradors

Registre de canvis

1.0.1

  • Security: sanitize and validate frontend submission/update form input at the request boundary (title, description, price, URL, location, enum, and boolean fields).
  • Security: escape all frontend and AJAX renderer output through explicit KSES allowlists, including filtered listing detail fields, listing cards, wishlist buttons, contact forms, and package selectors.
  • Removed obsolete phpcs:ignore suppression comments from code that is now properly sanitized and escaped.

1.0.0

  • Initial release.
  • Registered listing and listing_package custom post types.
  • Registered listing_category, listing_tag, listing_location, listing_condition taxonomies.
  • Added listing_poster and listing_moderator user roles.
  • Added shortcodes: [listingcore_listings], [listingcore_categories], [listingcore_search_form], [listingcore_post_listing_button], [listingcore_user_dashboard], [listingcore_listing_form].
  • Added AJAX handlers for wishlist, contact seller, live search, and load-more.
  • Added custom admin columns for the listings list table.
  • Added daily cron for listing expiry notifications.
  • Added REST API field registration and custom endpoints.