> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mylisting.club/llms.txt
> Use this file to discover all available pages before exploring further.

# Related Listings

> Related Listings in MyListing let you connect one listing to another, such as a job to a company or an event to a venue. Listing owners choose those links, then you show them on listing pages, preview cards, and Explore search.

## **Related Listings vs. Similar Listings**

MyListing has two features that both show other listings. They are not the same.

| **Feature**          | **How listings are chosen**                                                          | **Who controls it**                                                     |
| :------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------- |
| **Related Listings** | Someone picks the exact listing or listings to connect                               | You set up the field. The listing owner (or an admin) chooses the links |
| **Similar Listings** | MyListing finds matches by type, category, tags, region, author, or other taxonomies | You turn it on under **Single Page > Similar Listings**                 |
|                      |                                                                                      |                                                                         |

Use **Related Listings** when the relationship matters: company and jobs, place and events, and service and provider. Use **Similar Listings** when you want a “you may also like” section at the bottom of the listing page.

## **Where Do You Manage Related Listings?**

Go to **WP Admin > Listing Types**, then edit the listing type that should store the connection. You work in more than one editor section:

* **Fields**: Add and configure the Related Listing field
* **Single Page > Content & Tabs**: Show connected listings as a tab or a content block
* **Preview Card**: Show a related listing on search result cards
* **Search Forms**: Let visitors filter Explore results by a related listing Adding the field is only the first step. Visitors will not see the connection until you also add a tab, block, preview card section, or filter that uses that field.

## **Add the Related Listing Field**

Edit a listing type and open **Fields**. You can add the field in two ways:

* **Preset fields**: Click **Related Listing**. This uses the built-in field key `related_listing`.
* **Create a custom field**: Choose **Relational**, then **Related Listings**. Use this when one listing type needs more than one relationship, such as a Venue that links both to Events and to Vendors. Click the field to edit it, then click **Done** and save the listing type.

## **Field Settings**

These settings appear when you edit the Related Listing field.

| **Setting**                               | **What it does**                                                                                              |
| :---------------------------------------- | :------------------------------------------------------------------------------------------------------------ |
| **Label**                                 | The name owners see on the add and edit listing form                                                          |
| **Key**                                   | The internal field name. Shown only on custom fields. Must match on both listing types for two-way relations  |
| **Placeholder**                           | Hint text in the picker. If empty, owners see **Select listing**                                              |
| **Description**                           | Help text under the field                                                                                     |
| **Related to**                            | Which listing types can be selected. You can also choose **WP Posts**                                         |
| **Relation type**                         | Whether this listing links to one or many others, and which side is the parent                                |
| **Limit listing selections by author**    | Restrict the picker to the current author’s listings, or allow any author’s listings                          |
| **Limit listing selections by status**    | **Published** is always allowed. You can also allow **Pending approval**, **Pending payment**, or **Expired** |
| **Maximum number of selections allowed**  | For **Has Many** and **Belongs to Many**. Leave blank or `0` for no limit                                     |
| **Enable Package-Based Selection Limits** | Set a different selection limit per listing package                                                           |
| **Required**                              | Owners must pick a related listing before they can submit                                                     |
| **Show in submit form**                   | Show the field on the public add and edit listing form                                                        |
| **Show in admin edit page**               | Show the field when an admin edits the listing in wp-admin                                                    |
| **Show in listing comparison popup**      | Include the field when visitors compare listings                                                              |
|                                           |                                                                                                               |

The field also has a **Need Help?** button that opens the theme’s Related Listings tip.

### **Author and Status Limits**

By default, **Limit listing selections by author** is set to **Only listings that belong to the current author**. A company owner can then attach only their own job listings, not someone else’s. Choose **All listings that belong to any author** when owners should link to listings they do not own, such as an event linking to a public venue. **Published** listings can always be selected. Turn on extra statuses if you want owners to attach a listing that is not live yet. Those pending listings stay hidden on the front end until they are published.

## **Relation Types**

There are four relation types.

| **Relation type**   | **How many listings can be chosen** | **This listing’s role** |
| :------------------ | :---------------------------------- | :---------------------- |
| **Has One**         | One                                 | Parent                  |
| **Has Many**        | Several                             | Parent                  |
| **Belongs to One**  | One                                 | Child                   |
| **Belongs to Many** | Several                             | Child                   |
|                     |                                     |                         |
|                     |                                     |                         |
|                     |                                     |                         |
|                     |                                     |                         |

**Has One** and **Belongs to One** are for a single link. An event can belong to one venue. A job can belong to one company.

**Has Many** and **Belongs to Many** are for multiple links. A company can have many jobs. A venue can host many events.

Parent and child matter when you set up two-way relations. For a one-sided field, pick the type that matches how many listings the owner should select.

The field default is **Belongs to One**.

## **Two-Way Relations**

A two-way relation keeps both sides of a link in sync. Example: a Company can have many Job listings, and each Job belongs to one Company.

* Edit the Company and assign jobs. Those jobs also get the Company as their related listing.
* Edit a Job and assign a company. That Company also gets the Job in its list.

### **How to Set Up Two-Way Relations**

1. Decide which listing type is the parent. In this example, Company is the parent and Jobs are the children.
2. In the **Company** listing type, add a Related Listing field. Set **Related to** to Jobs. Set **Relation type** to **Has Many**.
3. In the **Job** listing type, add a Related Listing field. Set **Related to** to Company. Set **Relation type** to **Belongs to One**.
4. If you used custom fields instead of the preset, set the same **Key** on both fields.
5. Save both listing types. If you use the preset **Related Listing** field on both types, the keys already match (`related_listing`).

## **Multiple Related Listing Fields**

One listing type can have more than one Related Listing field. Use the preset for the main relationship. Add extra custom fields under **Fields > Create a custom field > Relational > Related Listings**. Give each custom field a clear **Label** and **Key**. On the single listing page, each tab or block must point at the field it should use.

## **Link to WordPress Posts**

The **Related to** setting includes **WP Posts**. Use this when a listing should link to a regular WordPress post instead of another listing, such as a case study, news article, or blog post. The theme’s own help text recommends **Has One** or **Has Many** for that setup.

## **Where Listing Owners Set Related Listings**

Owners pick related listings on the add listing and edit listing forms, as long as **Show in submit form** is on. The field is a search picker. For **Has One** or **Belongs to One**, they choose one listing. For **Has Many** or **Belongs to Many**, they can choose several, up to any selection limit you set. A few rules apply on the form:

* The visitor must be logged in. Guests see: **You must be logged in to add related listings.**
* The picker only shows listing types you checked under **Related to**.
* Author and status limits still apply. Admins can set the same field when they edit a listing in wp-admin, as long as **Show in admin edit page** is on.

## **Show Related Listings on the Listing Page**

A field does not display itself. You choose how visitors see the connections.

### **Related Listings Tab**

Go to **Single Page > Content & Tabs** and add the **Related Listings** preset tab. This tab loads a grid of preview cards for the connected listings. If there are many, the tab paginates. Tab settings:

| **Setting**                           | **What it does**                                                                                                                        |
| :------------------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------- |
| **Label**                             | Tab name visitors see, such as Jobs, Events, or Hosted By                                                                               |
| **URL slug**                          | Optional tab link appended to the listing URL                                                                                           |
| **Hide tab if there are no listings** | Hide the tab when this listing has no published related listings                                                                        |
| **Related Listings Field**            | Which Related Listing field to use                                                                                                      |
| **Listings order**                    | **Related field order** keeps the order from the form. **Recurring date field** sorts by a Recurring Date field on the related listings |
| **Recurring date field key**          | Which Recurring Date field to sort by. This appears only when **Listings order** is **Recurring date field**                            |
| **Hide past events**                  | Hide related listings whose recurring dates are in the past                                                                             |
|                                       |                                                                                                                                         |
|                                       |                                                                                                                                         |

**Recurring date field** is useful when a Place listing shows upcoming Events. The Recurring Date field must exist on the related listing type. If none are found, the editor shows: **No recurring-date fields were found in the related listing field target types.**

A Related Listings tab does not use content blocks. The grid is built in. To mix related listings with other content, use a **Related Listing** block in the Profile tab or a Custom tab instead.

### **Related Listing Block**

In **Single Page > Content & Tabs**, edit the **Profile** tab or a **Custom** tab. Under **Insert a New Block**, add **Related Listing**. The block shows a compact list: logo (or featured image for a WP post) and name, each linking to the related item. Use a block when you want a short “Hosted by” or “Company” mention inside the main profile, and a tab when you want a full grid of cards.

## **Show Related Listings on Preview Cards**

Go to **Preview Card** and add a footer section. Click **Related Listing**. Set:

* **Label**: Optional text. You can use field placeholders. Older `[[listing_name]]` labels still work. They are treated as `[[title]]`.
* **Use Field**: Which Related Listing field to read On search results, maps, and listing grids, the card can then show the related listing’s logo and name. After you change preview cards, regenerate the preview card cache under **Listings > Settings** so the live site updates.

<Note>
  If you use [MyListing Elementor Kit](/mylisting-elementor-kit), the Listing Feed widget can query **Related Listings**, and Kit preview cards are used in Related Listings tabs and other listing grids.
</Note>

## **Filter by Related Listing on Explore**

Go to **Search Forms > Advanced Form** or **Search Forms > Basic Form** and add a **Related Listing** filter. Choose which Related Listing field the filter uses. Turn on **Allow multiple selections?** if visitors should select more than one related listing at once. Example: on a Jobs Explore page, visitors can filter jobs by company. On an Events Explore page, visitors can filter events by venue. The filter only works if listings actually have that Related Listing field filled in.

## **How the Pieces Fit Together**

A practical **Company** and **Job** setup:

1. **Company Fields**: Add the preset **Related Listing** field. Set **Related to** to Jobs. Set **Relation type** to **Has Many**.
2. **Job Fields**: Add the preset **Related Listing** field. Set **Related to** to Company. Set **Relation type** to **Belongs to One**.
3. **Company Single Page**: Add a **Related Listings** tab labeled Jobs. Point **Related Listings Field** at the Company field. Turn on **Hide tab if there are no listings**.
4. **Job Single Page**: Add a **Related Listing** block in the Profile tab so each job shows its company.
5. **Job Preview Card**: Add a **Related Listing** footer section so job cards show the company name.
6. **Job Search Forms**: Add a **Related Listing** filter so visitors can search jobs by company. On the front end, a company owner adds jobs and assigns them to the company (or selects jobs from the company listing). Visitors then see those jobs on the company page and the company on each job and can filter the Jobs Explore tab by company.

## **Common Related Listings Setups**

<table>
  <colgroup>
    <col width="207" />

    <col width="549" />
  </colgroup>

  <thead>
    <tr>
      <th>**Site idea**</th>
      <th>**Typical link**</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>Job board</td>
      <td>Company **Has Many** Jobs. Job **Belongs to One** Company</td>
    </tr>

    <tr>
      <td>Events directory</td>
      <td>Place **Has Many** Events. Event **Belongs to One** Place</td>
    </tr>

    <tr>
      <td>Service marketplace</td>
      <td>Provider **Has Many** Services. Service **Belongs to One** Provider</td>
    </tr>

    <tr>
      <td>Local guide</td>
      <td>City **Has Many** Places. Place **Belongs to One** City</td>
    </tr>

    <tr>
      <td>Editorial directory</td>
      <td>Listing **Has One** or **Has Many** WP Posts for news or case studies</td>
    </tr>
  </tbody>
</table>

## **Helpful Tips**

* **Set up both sides when the link needs to stay in sync.** One field on one listing type is enough for a one-way mention. Use matching keys and opposite relation types for two-way editing.
* **Match the display to the field.** A Related Listing field does nothing on the listing page until you add a tab, block, or preview card section that uses it.
* **Start with the author limit turned on.** **Only listings that belong to the current author** prevents owners from attaching listings they do not own. Switch to any author only when that is the real workflow.
* **Use a tab for a grid and a block for a mention.** The Related Listings tab shows preview cards. The Related Listing block shows a short logo and name list.
* **Rename listing type slugs with care.** **Related to** store listing type slugs. After a rename, reopen the field and verify those checkboxes.
* **Pending links wait until publish.** If you allow pending or expired listings in the picker, they appear on the front end only after they are published.

## **Quick Reference**

<table>
  <colgroup>
    <col width="294" />

    <col width="690" />
  </colgroup>

  <thead>
    <tr>
      <th>**I want to...**</th>
      <th>**Go to...**</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>Let owners connect listings</td>
      <td>**Listing Types > Fields**, then add **Related Listing**</td>
    </tr>

    <tr>
      <td>Keep both sides of a link in sync</td>
      <td>Matching field **Key**, plus **Has Many** on the parent and **Belongs to One** on the child</td>
    </tr>

    <tr>
      <td>Show a grid of connected listings</td>
      <td>**Single Page > Content & Tabs**, then add a **Related Listings** tab</td>
    </tr>

    <tr>
      <td>Show one related listing in the profile</td>
      <td>**Single Page > Content & Tabs**, then add a **Related Listing** block</td>
    </tr>

    <tr>
      <td>Show the host or company on a card</td>
      <td>**Preview Card**, then add a **Related Listing** footer section</td>
    </tr>

    <tr>
      <td>Let visitors search by related listing</td>
      <td>**Search Forms > Advanced Form** or **Basic Form**, then add a **Related Listing** filter</td>
    </tr>

    <tr>
      <td>Sort related events by date</td>
      <td>Related Listings tab, set **Listings order** to **Recurring date field**</td>
    </tr>

    <tr>
      <td>Auto-suggest other listings instead</td>
      <td>**Single Page > Similar Listings** (a separate feature)</td>
    </tr>
  </tbody>
</table>

## **Where to Go Next**

* [Listing Types](/listing-types-101): Fields, single page tabs, preview cards, and search forms
* [Listing Feeds](/listing-feeds-101): Place listing grids on any page, including feeds of related listings when you use Elementor Kit
* [Add Listing Flow](/add-listing-flow-101): Where owners fill in the Related Listing picker
* [MyListing Elementor Kit](/mylisting-elementor-kit): Custom cards and a Listing Feed query for Related Listings

## **Common Questions**

* **Why is the Related Listing field empty or missing on the form?** Confirm **Show in submit form** is on, the visitor is logged in, and **Related to** includes at least one listing type that has published listings the author is allowed to select.
* **Why can an owner not find another user’s listing?** **Limit listing selections by author** is probably set to **Only listings that belong to the current author**. Change it to **All listings that belong to any author** if that is the intended workflow.
* **Why is the Related Listings tab missing?** Either no published related listings exist, or **Hide tab if there are no listings** is on. Also confirm the tab’s **Related Listings Field** points at the correct field.
* **Why do two-way links not update the other listing?** The field keys must match, **Related to** must point at each other, and the relation types must be opposite (for example **Has Many** and **Belongs to One**). Custom fields need the same **Key** on both listing types.
* **Can I have more than one Related Listing field?** Yes. Use the preset plus custom **Related Listings** fields under **Relational**. Point each tab, block, footer section, or filter at the field it should use.
* **Do Related Listings and Similar Listings use the same settings?** No. Related Listings come from a field the owner fills in. Similar Listings are an automatic match under **Single Page > Similar Listings**.
* **Can I link a listing to a blog post?** Yes. Check **WP Posts** under **Related to**, and use **Has One** or **Has Many**.
* **Why did related listing pickers break after I renamed a listing type?** The **Related to** checkboxes store the type slug. Re-check those boxes on every Related Listing field that pointed at the old slug.
