MyListing Links Repeater Field
The {CODICTS} MyListing Links Repeater Field plugin adds a versatile repeater-style custom field to the MyListing theme that allows listing owners to attach multiple link entries to a single listing. Each entry can include a title (or related listing reference), URL, optional description, optional image, optional price with currency, and optional country with flag icons. The plugin also supports CSV bulk import, country-based filtering, button-style URLs, and price shortcodes for finding the lowest price across related listings.
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 its template files into your child theme. Navigate to any Listing Type → Fields tab to start adding the Links Repeater field.
Key Features
| Feature | Description |
|---|---|
| Repeater Field | Add multiple link entries per listing, each with a title, URL, and optional description, image, price, and country. |
| Related Listing Integration | Replace free-text titles with searchable related listing selectors — linking entries to existing listings via MyListing’s relationship system. |
| Country Dropdown | Attach one or multiple countries (with flag icons) to each link entry, with an optional country filter on the display block. |
| Price Support | Add a price to each entry with 120+ configurable currencies, plus shortcodes for displaying prices and finding the lowest price across listings. |
| CSV Bulk Import | Import links in bulk from a CSV file (listing name, URL, price) when using related listings mode. |
| Button URLs | Optionally display URLs as styled buttons with customizable labels on the single listing page. |
| Image Upload | AJAX-powered image upload for each link entry with configurable size limits. |
| Display Block | List-style content block for the single listing page with images, flags, prices, and buttons. |
| Maximum Item Control | Limit how many links a listing owner can add. |
| Strict Item Check | Require previous entries to be filled before allowing new ones. |
How It Works
The plugin operates in two modes depending on whether “Use Related Listings Field” is enabled:
Standard Mode (Related Listings Disabled)
Listing owners type a free-text title and URL for each link entry, with optional description, image, price, and country. Links are displayed on the single listing page as a styled list where each entry links to the specified URL.
Related Listings Mode (Related Listings Enabled)
Instead of typing titles, listing owners select existing listings from a searchable dropdown. The plugin stores the relationship in MyListing’s wp_mylisting_relations table, enabling explore page filtering and related listing display blocks. Entries link to the selected listing’s page and use that listing’s logo as a fallback thumbnail.
Adding the Links Repeater Field
1. Edit a listing type in the MyListing admin.
2. Navigate to the Fields tab.
3. Click the {C} Links Repeater button in the field sidebar to add the field.
4. Configure the field settings:
General Settings
| Setting | Default | Description |
|---|---|---|
| Label | {C} Links Repeater | Display label for the field on the add/edit listing form. |
| URL Placeholder | URL | Placeholder text for the URL input. |
| Description | (empty) | Help text shown below the field. |
| Minimum Title Length | 3 | Minimum characters required for the link title. |
| Maximum Title Length | 25 | Maximum characters allowed for the link title. |
Optional Features
| Setting | Default | Description |
|---|---|---|
| Enable Description | On | Shows a description textarea for each link entry. |
| Maximum Description Length | 25 | Maximum characters for the description (visible when description is enabled). |
| Enable Images | On | Shows an image upload area for each link entry. |
| Image Upload Size (KB) | (empty) | Maximum image file size in kilobytes. Leave empty for WordPress’s default upload limit. |
| Enable Price | Off | Shows a price input for each link entry. |
| Currency | USD | Currency code for price display (120+ currencies supported). Visible when price is enabled. |
| Use Button for URL | Off | Displays URLs as styled buttons on the single listing page instead of wrapping the content in a link. |
| Button Label | Button | Text displayed on the button. Visible when button is enabled. |
Country Dropdown Settings
| Setting | Default | Description |
|---|---|---|
| Enable Country Dropdown | Off | Shows a country selector for each link entry. |
| Allow Multiple Countries | Off | Allows selecting multiple countries per entry (visible when country is enabled). |
| Show Country Filter | Off | Adds a country filter dropdown on the single listing page so visitors can filter links by country (visible when country is enabled). |
Note: The country list is sourced from WooCommerce. WooCommerce must be installed and active for the country dropdown to populate.
Related Listings Settings
| Setting | Default | Description |
|---|---|---|
| Use Related Listings Field | Off | Replaces the free-text title with a searchable listing selector. |
| Related Listings Field Key | related_listing | The field key used for storing relationships in MyListing’s relations table (visible when enabled). |
| Related To | (none) | Listing type(s) to pull related listings from (multi-select, visible when enabled). |
| Relation Type | has_one | Relationship direction (visible when enabled). |
| Limit by Author | Author | “Author” = only the current user’s listings appear. “Any” = all authors’ listings appear (visible when enabled). |
| Limit by Status | (none) | Additional post statuses to include besides “publish”: pending, pending payment, expired (visible when enabled). |
| Use CSV Import | Off | Enables CSV file import for bulk-adding link entries (visible when enabled). |
Relation type options:
| Type | Description |
|---|---|
| Has One | Current listing is the parent, selected listing is the child (single relationship). |
| Has Many | Current listing is the parent, multiple children allowed. |
| Belongs to One | Current listing is the child, selected listing is the parent (single relationship). |
| Belongs to Many | Current listing is the child, multiple parents allowed. |
Item Control Settings
| Setting | Default | Description |
|---|---|---|
| Maximum Links Fields | 0 (unlimited) | Maximum number of links per listing. Set to 0 for unlimited. |
| Strict Item Check | Off | When on, all previous link entries must be filled before adding a new one. |
5. If using related listings, also add a standard MyListing Related Listing field to the same listing type with a matching field key (matching the “Related Listings Field Key” setting). This enables MyListing’s built-in related listing blocks and explore page filtering. The Related Listing field can be hidden from both the submit form and admin — the Links Repeater handles the relationship data.
6. Save the listing type.
Adding the Display Block
1. Edit the same listing type.
2. Navigate to the Single Page tab.
3. Add a new content block and select “{C} Links Repeater”.
4. Configure the block settings:
| Setting | Default | Description |
|---|---|---|
| Title | {C} Links Repeater | Section heading displayed above the links list (e.g., “Related Stores,” “Resources,” “Buy From”). |
| Source Field | (none) | Select the Links Repeater field to display. Only Links Repeater fields appear in this list. |
5. Save the listing type.
What Visitors See
On the single listing page, visitors see a styled list where each entry displays the title (or related listing name), optional 70×70px image thumbnail, optional description, optional country flags with names, optional price badge, and either a clickable link wrapping the content or a styled button — depending on your configuration. If the country filter is enabled, a dropdown appears above the list for filtering by country.
Country Dropdown & Filtering
When the country dropdown is enabled, each link entry includes a country selector. Countries display with flag icons on the single listing page.
| Option | Description |
|---|---|
| Single country | Each link has one country associated with it. |
| Multiple countries | Each link can have multiple countries (enable “Allow Multiple Countries”). |
| Country filter | When “Show Country Filter” is enabled, visitors see a dropdown above the links list to filter by country. Non-matching entries are hidden instantly (client-side filtering). |
Note: The country list requires WooCommerce to be installed. Flags are loaded from FlagCDN (
flagcdn.com).
Price & Currency
When the price feature is enabled, each link entry includes a price input. Prices are displayed on the single listing page as formatted badges with the configured currency code (e.g., “USD 100” or “EUR 29.99”). The plugin supports 120+ currencies from the field settings dropdown.
CSV Bulk Import
When both “Use Related Listings Field” and “Use CSV Import” are enabled, a CSV file upload input appears below the repeater on the edit listing form.
CSV Format
| Column | Description |
|---|---|
| Listing name | The title of the related listing to match. |
| Link (URL) | The URL for the link entry. |
| Price | The price value. |
The first row (header) is skipped. Supported delimiters: comma, semicolon, tab, or pipe (auto-detected).
How It Works
1. Upload a CSV file via the file input below the repeater.
2. The plugin reads the file and matches each listing name to an existing listing by title.
3. A confirmation dialog appears: “This will replace all existing links.”
4. On confirmation, all existing repeater entries are replaced with the CSV data.
Note: CSV import is only available when editing an existing listing (not when creating a new one).
Price Shortcodes
The plugin provides two shortcodes for displaying price data from the Links Repeater field.
[codicts-link-repeater-price]
Displays the price from a specific link entry that matches the current listing context.
| Attribute | Required | Description |
|---|---|---|
| id | Yes | The ID of the listing containing the Links Repeater field. |
| field | Yes | The field key of the Links Repeater field. |
| currency_prefix | No | A prefix for the price (e.g., $, €). |
| currency_postfix | No | A postfix for the price (e.g., USD, EUR). |
| europe_currency | No | Set to true for European number formatting (comma as decimal, period as thousands). |
Example:
[codicts-link-repeater-price id="123" field="product-prices" currency_prefix="$"]
[codicts-link-repeater-price-lowest]
Finds and displays the lowest price across all listings of a given type that reference a specific listing.
| Attribute | Required | Description |
|---|---|---|
| id | Yes | The ID of the listing to find the lowest price for. |
| field | Yes | The field key of the Links Repeater field to search. |
| listing_type | Yes | The listing type slug to search through. |
| currency_prefix | No | A prefix for the price. |
| currency_postfix | No | A postfix for the price. |
| europe_currency | No | Set to true for European number formatting. |
Example:
[codicts-link-repeater-price-lowest id="456" field="product-prices" listing_type="stores" currency_postfix="EUR" europe_currency="true"]
Note: These shortcodes only work with the related listings mode and the price feature. They find entries where the related listing matches the current listing context.
Example Setup — Store Price Comparison
1. Activate the plugin with the MyListing theme and a child theme active.
2. You have two listing types: “Products” and “Stores.” Each Store listing links to Products it carries, with a price for each.
3. Edit the “Stores” listing type. On the Fields tab, add a {C} Links Repeater field. Configure it:
a. Set Label to “Products & Prices.”
b. Enable Use Related Listings Field. Set Related To to “Products” and Relation Type to “Has Many.” Set Limit by Author to “Any.”
c. Enable Price and set Currency to “USD.”
d. Enable Use Button for URL and set Button Label to “Buy Now.”
e. Enable CSV Import for bulk adding.
4. Add a standard MyListing Related Listing field to Stores with a matching field key. Hide from submit form and admin.
5. On the Single Page tab, add a “{C} Links Repeater” content block. Set the Title to “Available Products” and the Source Field to your Links Repeater field.
6. Save the listing type.
7. A store owner creates their listing and uses the repeater to select Products, entering a price and URL for each. Alternatively, they upload a CSV file with product names, URLs, and prices to bulk-import entries.
8. On the store’s listing page, visitors see a list of products with thumbnails (pulled from the Product listings’ logos), prices, and “Buy Now” buttons.
9. On a Product listing’s page, use the shortcode [codicts-link-repeater-price-lowest id="PRODUCT_ID" field="products-prices" listing_type="stores" currency_prefix="$"] to show the lowest price available across all stores carrying that product.
Example Setup — International Resources with Country Filter
1. Edit a listing type (e.g., “Services”).
2. Add a {C} Links Repeater field. Configure it:
a. Enable Country Dropdown, Allow Multiple Countries, and Show Country Filter.
b. Enable Images.
c. Leave “Use Related Listings Field” disabled (standard mode with free-text titles).
3. Add a “{C} Links Repeater” content block on the Single Page tab.
4. Save. Listing owners add link entries with titles, URLs, images, and country selections. On the listing page, visitors see all links with country flags and can filter by country using the dropdown above the list.
Frequently Asked Questions
Does this require a child theme?
Yes. The plugin copies template files into the child theme for the repeater form field and display block. Without a child theme, the plugin cannot install its templates.
Why is the country dropdown empty?
The country list is sourced from WooCommerce’s WC_Countries class. WooCommerce must be installed and active for the country dropdown to populate.
Do I have to use the related listings feature?
No. With “Use Related Listings Field” disabled, the repeater works in standard mode with free-text titles and URLs. This is simpler and doesn’t require any additional listing types or relationship configuration.
How does the CSV import work?
Upload a CSV file with three columns: listing name, URL, and price. The plugin matches listing names to existing listings by title, then replaces all current repeater entries with the imported data. CSV import is only available in related listings mode when editing an existing listing.
What CSV delimiters are supported?
Comma, semicolon, tab, and pipe. The delimiter is auto-detected from the first row of the file.
Can I limit how many links users can add?
Yes. Set “Maximum Links Fields” in the field settings to your desired limit. Set to 0 for unlimited.
How do the price shortcodes work?
The [codicts-link-repeater-price] shortcode displays a price from a specific link entry matching the current listing context. The [codicts-link-repeater-price-lowest] shortcode searches across all listings of a given type and returns the lowest price for a specific related listing. Both require the related listings mode with prices enabled.
Can I use European number formatting?
Yes. Add europe_currency="true" to either price shortcode to use comma as the decimal separator and period as the thousands separator (e.g., 1.234,56 instead of 1,234.56).
How do I change the delete button from an icon to text?
Add this to your child theme’s functions.php:
add_filter( 'codicts-mylisting-links-repeater-field::change-delete-buttons', '__return_true' );
Does the plugin create any database tables?
No. Link data is stored as post meta on the listing. When using related listings mode, relationships are stored in MyListing’s existing wp_mylisting_relations table. No custom database tables are created.
What happens when the plugin is deactivated?
The template files are removed from the child theme and the field and block will no longer appear. Link data stored in post meta and relationships in MyListing’s relations table are preserved. Reactivating the plugin restores full functionality with existing data intact.
Troubleshooting
Field Not Appearing in Listing Type Editor
| Cause | Solution |
|---|---|
| Templates not installed | Deactivate and reactivate the plugin to force-reinstall templates. Verify template files exist in your child theme’s templates/ directory. |
| Plugin not activated | Go to Plugins → Installed Plugins and verify the plugin is active. |
| MyListing or child theme not active | Both the MyListing theme and a child theme must be active. |
Related Listing Selector Shows “No Listing Found”
| Cause | Solution |
|---|---|
| No published listings of the selected type | Ensure the related listing types have published listings available. |
| Author restriction too narrow | If “Limit by Author” is set to “Author,” only the current user’s listings appear. Change to “Any” to show all authors’ listings. |
| Status restriction | By default only published listings are shown. If you need pending or expired listings, add those statuses in the “Limit by Status” setting. |
Country Dropdown Empty
| Cause | Solution |
|---|---|
| WooCommerce not installed | The country list requires WooCommerce. Install and activate WooCommerce. |
Country Flags Not Displaying
| Cause | Solution |
|---|---|
| CDN not reachable | Flags are loaded from flagcdn.com. Ensure your site can reach this external CDN. Check for firewall or content security policy restrictions. |
CSV Import Button Not Showing
| Cause | Solution |
|---|---|
| Prerequisites not met | CSV import requires both “Use Related Listings Field” and “Use CSV Import” to be enabled in the field settings. Additionally, you must be editing an existing listing (not creating a new one). |
Price Shortcode Returns Nothing
| Cause | Solution |
|---|---|
| Incorrect attributes | Verify the id and field attributes are correct. For the lowest-price shortcode, ensure listing_type is also specified. |
| No price data | The field must have price data with matching related listings. The shortcodes only work with the related listings mode and price feature enabled. |
Template Overwrite Warning
The following template files in your child theme are managed by this plugin and will be overwritten on reactivation and updates:
templates/add-listing/form-fields/links-repeater-field.php
templates/single-listing/content-blocks/links-repeater-block.php
If you’ve customized these files, back up your changes before updating the plugin or deactivating/reactivating it.
“MyListing Theme Not Detected” or “Child Theme Not Detected” Error
The MyListing theme and a child theme must both be installed and active. Go to Appearance → Themes to verify.
For further support, visit codicts.com or contact us at support@codicts.com.