Skip Navigation

[Gelöst] site format issue

This support ticket is created vor 5 Jahren, 6 Monaten. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Dieses Thema enthält 8 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Waqar vor 5 Jahren, 6 Monaten.

Assistiert von: Waqar.

Author
Artikel
#1239664

Hi Waqar, good day. this going to be a long discussion here .

i am having some major serious issue here:
i need to achieve this format lie this below.

main cpt : site.com /listings /cpt_slug / - its working now. live link : versteckter Link

1. Taxonomy view : site.com /listings /cpt_slug /tax_slug : versteckter Link > doesn't work .

Do i need to create view for this or update url etc ?

but this works : versteckter Link

i am using this plugin to achieve my needs : versteckter Link , its working well so far.

2. notice that at this url : versteckter Link

the rest of the taxonomy value is being removed , is there anyway to fix this ? i need the active option checked and the rest unchecked but not masked/hide.

Pls let me know if anything youre not clear. thanks .

#1239760

Hi Dee,

Thanks for asking! I'd be happy to help.

1. By default, WordPress adopts the following structure for the taxonomy term's archive pages:

yourwebsite.com / taxonomy-slug / taxonomy-term-slug

Using the Toolset's "Replace taxonomy slug with this" option on the custom taxonomy's edit screen ( screenshot: versteckter Link ), you can adjust the "/ taxonomy-term-slug" part, but cannot add/remove anything else.

To have a custom structure for your taxonomy term's archive pages, you'll either need custom rewrite rules or a third-party plugin like the one you're already using ( versteckter Link ).

2. It is important to remember the actual role of the taxonomy term's archive pages in WordPress. They're designed to show only those posts which are attached to the current term, whose archive page is being viewed.

This is the reason that when an archive view is being used on such archive pages, only the current term is available as an option in filters.
( as you noted that "D01 Raffles Place, Cecil, Marina, Peoples Park" is the only option on page versteckter Link )

Based on what you've shared, your requirement here is different from what the archive pages are designed for, so I'll recommend using regular post view instead of the WordPress archive view.

For example, instead of aiming for the URL structure:

site.com /listings /cpt_slug /tax_slug

You can structure it like:

site.com /listings /cpt_slug / ?tax={tax_ID}

This means that you'll need to make your template for the single "listing" to show the single post's content when only the site.com /listings /cpt_slug part is viewed and when a URL parameter part is appended to it ( i.e. ?tax={tax_ID} ), it should show a post view, which gets the ID of the term from the URL parameter and then show the content accordingly.

I hope this makes sense and please let me know if you have any questions around this.

regards,
Waqar

#1239832

Hi, i roughly understand what you trying to say but i lost the last part

"This means that you'll need to make your template for the single "listing" to show the single post's content when only the site.com /listings /cpt_slug part is viewed and when a URL parameter part is appended to it ( i.e. ?tax={tax_ID} ), it should show a post view, which gets the ID of the term from the URL parameter and then show the content accordingly."

How do i do this pls ? Single listings is not detail view i hope ?

#1239834

" the rest of the taxonomy checkbox is being removed , is there anyway to fix this ? i need the active option checked and the rest unchecked but not masked/hide. "

is there any other ways to fix this issue ? js ? thanks

#1239866

following up. take a look here: versteckter Link

it suppose to display the options for this taxonomy main term , there is 3 but its not shown.

#1239922

Hi Waqar, i crack my head for the past one week . i think the best solution for me now is to convert the taxonomy into custom fields. my setup should not have any taxonomies in fact. whats your view ?

#1240195

Hi Dee,

Thanks for writing back.

1. i roughly understand what you trying to say but i lost the last part .... How do i do this pls ? Single listings is not detail view i hope ?

- To clarify this point further, you can create a custom shortcode, that would return true when a URL parameter e.g. "tax" is available in the URL and false when it isn't.
( ref: versteckter Link )

Next, in your template for the single listings page, you can include two conditional blocks, which would show one block when that shortcode will return true (i.e. URL parameter "tax" is present ) and the other one, when the shortcode returns false ( i.e. URL parameter "tax" is not present ).
( ref: https://toolset.com/documentation/user-guides/conditional-html-output-in-views/using-shortcodes-in-conditions/ )

2. " the rest of the taxonomy checkbox is being removed , is there anyway to fix this ? i need the active option checked and the rest unchecked but not masked/hide. "

is there any other ways to fix this issue ? js ?

- I'm afraid while using the archive views, this won't be possible.

3. following up. take a look here: versteckter Link

it suppose to display the options for this taxonomy main term , there is 3 but its not shown.

- I'm sorry, but I couldn't understand exactly what you meant here. Since your website has a relatively complex set up and I don't have access to the admin area, I'm relying fully on what you'll describe.

It would help if you could share some more details about this question, ideally in a new ticket, for clarity and more focused discussion.

4. i crack my head for the past one week . i think the best solution for me now is to convert the taxonomy into custom fields. my setup should not have any taxonomies in fact. whats your view ?

- Again, since I don't have fully up-to-date information and visibility on what was the original plan/requirement for which you opted to use this "Landed District" custom taxonomy, I'll be relying on what we have discussed so far. You're welcome to share more specific details about the expected role of this taxonomy and I'll be happy to suggest whether it should be replaced with a custom field or not.

As a general rule, taxonomies are useful when we need to show similar posts grouped on pages (the archive pages). If we agree that in this current scenario the archive views are not serving the required purpose, then yes, it would make sense to drop the taxonomy usage in favor of the custom field.

I hope this helps and I'll wait for more information.

regards,
Waqar

#1240241

Hi Waqar, Thank you . i need some time to process this information. will revert back soon.

#1240254

Hi Dee,

You're welcome and I'll wait for an update.

For each new question/concern, please open a new ticket.

regards,
Waqar