Skip Navigation

[Resolved] Custom Category list must link to specific pages

This support ticket is created 3 years, 2 months ago. 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.

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: Africa/Casablanca (GMT+01:00)

This topic contains 7 replies, has 2 voices.

Last updated by adriS 3 years, 2 months ago.

Assisted by: Jamal.

Author
Posts
#2179729

Tell us what you are trying to do? I'm creating a tourist site where members will be able to upload their own tourism attractions. There are 102 towns in this area so I made a category for each town so that members can link a town to a post to make conditional views easier per town. Let's say the town is Burgersdorp. Is there a way I can link the category Burgersdorp to the specific page I made for Zoar with background information on it? Alternatively, is there a way I can make a select list of the main town pages?

Is there any documentation that you are following? Cannot find anything

Is there a similar example that we can see? Cannot find anything

What is the link to your site? hidden link on this page the link to Burgersdorp is the select option member will use, but it goes to an archive page where I want it to go to Burgersdorp's main info page

#2179977

Hello and thank you for contacting Toolset support.

Well, that's not possible out of the box. The taxonomy terms links will be pointed to the corresponding taxonomy archive. In this case, it is hidden link

However, we can find a way to achieve what you want. I just want to understand why would you do that? Why not customize the taxonomy archive?
Please elaborate more on your use case, and I am sure we'll find a way.

#2180055
Screenshot (629).png
Screenshot (628).png

Hello Jamal

This is a crazy big project and website. Thank you for helping.

What about writing a redirect for all the Town Taxonomy Archive pages? Can that be done? I'm not finding those pages so I assume all works of the same archive temp, including all the other taxonomies too. I have a few customs taxonammies

This site is already huge, and potentially confusing. Having 2 pages with essentially the same name - The towns name - can just add to the confusion.

There are 102 towns if I remember correctly. Is there a way one can write a Conditional that will be everywhere in the site where the taxonomy of a town is used it is redirected to its related Town's page? I'm attaching a screenshot. That icon navigation bar at the top is done for each group of town pages. So there will be 102 Icon Navigation blocks that are used depending on the town.

Or is there a way to write dynamic icon navigation? Originally I thought I would, seeing that I made all the towns and the related pages parent and child pages in the same order (image 2)? But not finding a dynamic way to do that.

#2180091

IMHO, from an SEO perspective, redirects would be the best solution. That way, even direct URLs to taxonomy archives will be redirected to the corresponding page correctly, and it won't be indexed separately.

Otherwise, from Toolset, you should first disable taxonomy archives. Edit the custom taxonomy, in Toolset->Taxonomies, and disable the "Public" option.

Then, you will have to build the links manually. So, it does not return hidden link
You won't be able to use the built-in Toolset feature, as it will always return the taxonomy archive link.

For that, you will need a custom code. Why? Because you will need a way to automate this, without needing to have 102*5 conditions in the content template. A shortcode would be a good solution.

Building a shortcode will also require to have some logic of pulling data(getting the corresponding page URL for the current taxonomy term). This can be done in Toolset in many ways. A term field to store the page ID on each taxonomy term, a custom field to store the term ID on each page(used for this purpose).
Or, simply, assigning this "Towns" taxonomy to pages, and assign each used page to its relevant taxonomy term. This way, in the shortcode, you can search for the page that is also assigned to the current term, and get its URL. Does it make sense?

Finally, I still believe that redirects are the best solution. There a good plugins out there that could help you with it. These are two that also support exporting/importing redirects. This way, you can create the redirections manually and export them as a backup to be imported if needed.
- hidden link
- hidden link

I'll remain at your disposal if you have any questions.

#2180097

Thank you Jamal, my gut says redirect to. So I will redirect.

Regarding the Icon Navigation bar. Can a function be written so that each icon is linked to the specific order related to the parent page? And that it can direct what the parent page is?

New threads created by Jamal and linked to this one are listed below:

https://toolset.com/forums/topic/order-navigation-icons-for-subpages/

#2180107

Even if I have to get someone to write the code, I just want to know if the logic for a function like that can be done? I see there are people I can hire, not sure if I can hire you directly from this platform?

#2180113

Well, these are two questions to answer: The order, and the icons. This is on the parent page and should link, either to the subpage(simple) or to the terms(complex: as it will be redirected again to the subpage), right?

However, for support rules, we are able to handle only one issue at a time. This helps us to bring you a better service and also helps other users to find all the information here exposed. For that reason I have to kindly ask you to open a new thread if you need further assistance, you can assign it directly to me. In that way, you don't have to wait and we can continue working on it.

#2180117

My issue is resolved now. Thank you!