| 开发者 | virendrasingh06 |
|---|---|
| 更新时间 | 2026年9月9日 18:23 |
| PHP版本: | 8.0 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
listing post type with full admin support, REST API, and rich meta fields (price, condition, brand, model, location, contact info, expiry date, and more).listing_poster (submits and manages their own listings) and listing_moderator (manages other users' listings and listing categories).[listingcore_listings], [listingcore_categories], [listingcore_search_form], [listingcore_post_listing_button], [listingcore_user_dashboard], [listingcore_listing_form], [listingcore_contact_form], [listingcore_wishlist]./wp-json/listingcore/v1/listings and /wp-json/listingcore/v1/listings/{id}/similar.[listingcore_listings cat="electronics" count="8" view="grid" featured="1"]
Parameters:
cat — Category slug or ID (optional)count — Number of listings (default: 8)view — grid or list (default: grid)featured — Set to 1 to show featured listings onlylocation — Exact city name (default: none)sort — date, price_asc, price_desc, views (default: date)order — ASC 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"]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 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_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]
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./wp-content/plugins/ directory, or install via the WordPress plugin installer by uploading the ZIP file.[listingcore_listing_form], [listingcore_user_dashboard]).Yes. The theme handles presentation only. This plugin provides the classified ads data layer (post types, taxonomies, roles, shortcodes, and AJAX functionality).
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.
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.
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.
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.
Yes. All strings use the listingcore text domain.
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.
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.
phpcs:ignore suppression comments from code that is now properly sanitized and escaped.listing and listing_package custom post types.listing_category, listing_tag, listing_location, listing_condition taxonomies.listing_poster and listing_moderator user roles.[listingcore_listings], [listingcore_categories], [listingcore_search_form], [listingcore_post_listing_button], [listingcore_user_dashboard], [listingcore_listing_form].