URL structure
-
Hello,
I want to create two different directory types.
However, I want to create separate URL structures for them.
For example:
sitename.com/cars/123/
sitename.com/jobs/123/
Can this kind of structure be created?
My goal is to completely separate the two different content directories from each other.
However, I don’t want visitors or search engines to understand this. I want to manage the URL structures as completely separate from each other.
-
Hi @aga2442,
You can achieve this by enabling the “Add Directory Type to Permalink” option under Directory Listings > Settings > Listings > Single Listing. Once enabled, the directory type slug will automatically be added to the permalink structure, allowing each directory type to have its own unique URL format (e.g.,
sitename.com/cars/123/andsitename.com/jobs/123/).Here’s a screenshot for your reference: https://share.cleanshot.com/KdCZP039
Regards,
Al-Amin Khan
The Directorist TeamI am editing the slugs in the directory builder field. This works without any issues.
Example: job and business
If I do not enter a value in the Slug field under Settings > Listings > Single Listing, the URL on the listing pages will be generated as follows: sitename.com/at_biz_dir/test-url/
If I enter a value (e.g., abc), the URL will be formed like this: sitename.com/abc/test-url/
My goal is for the value I specify in the abc field to appear before the listing URL.
Example: sitename.com/job/test-url/
Example: sitename.com/business/test-url/
How can I achieve this?
Note: I tried several different approaches and also saved the changes on the permalinks page, but the result remains the same.
I think I’ve solved my problem.
It worked when I applied it as shown in the picture.
I hope this is the right method 🙂
In my last message, I mentioned a solution, but it affected all other pages on the website, and now none of the pages can be opened.
I hope you understand my problem.
I need a permanent solution.
Hi @aga2442,
Thanks for the update. Are you using the “Add Directory Type to Permalink” option under Directory Listings → Settings → Listings → Single Listing?
Could you please share what exact change you made before the other pages stopped working? Also, please share your website URL so we can check what’s happening, as this shouldn’t be the case.
Regards,
The current settings are as follows.
https://ibb.co/wrwgjjSf
https://ibb.co/99hvCSjSThe URL addresses generated with these settings are as follows:
sitename.com/test/seo-specialist/
My goal is very simple:
I do not want the word “test” to appear in the generated URL addresses.
I want it to be structured like this:
sitename.com/job/new-url/
Summary: The job keyword content must be taken from the slug field in the directory builder field.
Why I want this: I currently have a directory plugin on my website. It contains hundreds of different listings. I will transfer all the content to your plugin and don’t want any issues to arise.
@alamin56649 ???
Hi @aga2442,
Thank you for your detailed updates and for sharing the screenshots. Apologize for any confusion! If I understand you correctly, you want to display listings with a clean URL structure like
sitename.com/job/listing-name/orsitename.com/business/listing-name/. To achieve this without affecting other pages, please ensure the following:- Enable the “Add Directory Type to Permalink” option
Go to Directory Listings → Settings → Listings → Single Listing and enable this option. This will automatically include the directory type slug in the listing URLs. - Set the slug in the Directory Builder field
Make sure the slug for each directory type (e.g.,job,business) is set correctly in the Directory Builder. The URL will then follow the format:sitename.com/{slug}/listing-name/. - Avoid applying manual changes that affect site-wide permalinks
Changing the permalink settings manually can break other pages. Only use the Directory Builder slug + “Add Directory Type to Permalink” option for a safe setup. - Flush permalinks after changes
After updating these settings, go to Settings → Permalinks in WordPress and click “Save Changes” to refresh your permalinks.
Following these steps should give you the permanent URL structure you need without impacting other pages.
If you still notice any issues after this, please share your website URL, and we’ll check it directly to ensure everything works correctly.
I’m still stuck on the URL structure and would really appreciate a precise, step-by-step solution from you. What I want
I have 2 directory types and I want this URL structure:
https://site.com/job/{listing-slug}/https://site.com/business/{listing-slug}/
So:
job= base for the “Job” directory typebusiness= base for the “Business” directory type- No
/directory/(or any other extra segment) before those.
What I’m getting now
Right now my single listing URLs are:
https://site.com/directory/job/font-end-developer/https://site.com/directory/business/mall-of-america/
I need to remove the
/directory/part completely, but keep the directory type slug (job/business) in the URL. Current configuration- WordPress: (latest stable)
- Directorist: 8.5.6
- Multi-directory: Enabled
- Two directory types are configured as:
- Directory type 1:
- Name: Jobs
- Slug:
job
- Directory type 2:
- Name: Business
- Slug:
business
- Directory type 1:
- In Directory Listings → Settings → Listings → Single Listing (screenshot I sent earlier):
- “Add Directory Type to Permalink” = ON
- “Listing Slug” (Single Listing Slug) = empty
- After any change, I always go to Settings → Permalinks → Save to flush rewrite rules.
- There is no visible “Permalinks” tab under Directorist settings in my admin (no place where I can set or clear a “Listing Base” like
directory). - I also temporarily switched to a default theme and deactivated all non-essential plugins to confirm the prefix is not coming from the theme or other plugins. The URLs stayed the same (
/directory/job/...), so it seems to be purely Directorist-side behavior.
What I’ve already tried (unsuccessful)
- Verified both directory types have correct slugs (
job,business). - Verified “Add Directory Type to Permalink” is enabled and the global Single Listing Slug field is empty.
- Flushed permalinks multiple times.
- Tried various filters in a must-use snippet (Perfmatters snippet), for example:
atbdp_listing_slug_patternatbdp_rewrite_basedirectorist_listing_base
None of these changed the/directory/prefix in practice (even after flushing permalinks).
- Disabled the theme and theme-related plugins to ensure nothing theme-side is forcing
/directory/.
Despite all that, the URL always remains:
/directory/job/{slug}/directory/business/{slug}
What I need from you
I don’t want to hack the database or rely on a fragile workaround that breaks on updates. I need the official, supported way to configure Directorist (v8.5.x, multi-directory enabled) so that:
- Single listing URLs become:
site.com/job/{listing-slug}site.com/business/{listing-slug}
- The
/directory/prefix is completely removed. - The solution is stable across updates and does not require manual DB edits.
Could you please provide:
- The exact settings path and fields I should use in the current version (8.5.6) to control/remove the
/directory/base in multi-directory mode? - If this is controlled by a specific option (for example, something like
single_listing_slug_with_directory_typeor a “Directory Base” setting), where exactly can I change this in the UI in 8.5.6? - If the current version does not allow removing
/directory/via UI, what is the recommended, update-safe PHP filter (with the correct hook names for 8.5.6) that you suggest to achieve:{directory_type}/{slug}
instead ofdirectory/{directory_type}/{slug}?
Right now I’m blocked at this point, so a concrete step-by-step answer for my specific setup (2 directory types:
jobandbusiness, multi-directory enabled) would be extremely helpful.Thank you in advance.
- Enable the “Add Directory Type to Permalink” option
The topic ‘URL structure’ is closed to new replies.