Skip Navigation

[Resolved] I'm trying to recreate my site hidden link but I'm having many problems

This support ticket is created 6 years, 8 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 8 replies, has 2 voices.

Last updated by Luke Rees 6 years, 8 months ago.

Assisted by: Christian Cox.

Author
Posts
#556192
image of archive issues.png

I am trying to use Toolset to create a directory site base on my existing site hidden link. I have added some new post types that are listings, added fields etc all no problem.

The main issue comes in having navigation and recreating the URL structure of the existing site.

**Please note below I have given examples for AWE365.com this is our current site. The new site is stored locally using all the same data so I can't provide access to it.

On our existing site you can navigate by the custom taxonomies activity and destination and also by category. Creating the following URLs

singular:
hidden link
hidden link
hidden link
or in combination:
hidden link
hidden link
hidden link

It uses the standard wordpress URL functionality and rewrites to look pretty eg
hidden link
is really
hidden link

The first major problem is that I can't get Toolset to combine taxonomies within a menu system so that visitors can navigate to a page for an activity plus a destination. The pages are there when i go to the the standard wordpress URLs eg hidden link or hidden link but i can't make a menu that points to them.

I have tried using menus and taxonomy views but it never combines the taxonomies, instead it always just takes you to one taxonomy eg if I where to click on Europe from hidden link it takes me to hidden link when it should go to hidden link

I assume I am missing something simple here as surely there is a way to do this? Please note i tried using the parametric search as a menu but the URL's created are not very user friendly and the search would not be indexed by google.

The second problem is to do with filtering by archive. It works fine when I have 1 archive eg hidden link but as soon as I combine 2 or more eg hidden link it only filters by the first taxomomy and not the second. I have tried every setting in the view filters and cannot make it filter by both (please note I am using 'AND' within the filters). It seems to me as if it is only looking at the archive for the first taxonomy and not both of them as requested.

I have added an annotated image of the dev site taxonomy archive page which hopefully helps.

Hopefully you can help/give some pointers without us having to figure out a way to give access to our dev environment.

Many Thanks

Luke

#556265

Hi, I'll try to fill in the gaps for you. Please find my answers below.

The first major problem is that I can't get Toolset to combine taxonomies within a menu system so that visitors can navigate to a page for an activity plus a destination. The pages are there when i go to the the standard wordpress URLs...but i can't make a menu that points to them.
If the link destinations for some menu items are variable depending on what page you are visiting when you use the menu, then this is something that Toolset probably can't help you accomplish with a standard menu. Personally, I feel that it would be really confusing if the same link went to different destinations based where I was when I clicked it. This seems like quite a difference from standard web interfaces. Think about Amazon's Departments menu. These links aren't variable based on your location in the site. They are constant, and this is what Users expect. But if your site has a different need, I understand. I just wanted to caution you on this type of non-standard interface.

The menu systems in WordPress are designed to point to constant locations, not locations that vary based on your current location in the site. Toolset's search features are designed to work with URL parameters, not custom directory structures, so any changes to this would require some custom code...and I don't think it will be cost-effective to try to change that.

I have tried using menus and taxonomy views but it never combines the taxonomies, instead it always just takes you to one taxonomy...I assume I am missing something simple here as surely there is a way to do this?
Right, these menu items are designed to take you to a standard WordPress Archive or a single result page, not to a filtered custom search. Further, they are designed to link to the same destination no matter where they are displayed on your site. It sounds like neither of these really works for the navigation you have in mind, so it might require a more custom approach.

Please note i tried using the parametric search as a menu but the URL's created are not very user friendly and the search would not be indexed by google.
Views custom searches depend on URL parameters, and there's no way to automatically convert these to use a custom directory structure. Whenever a user manipulates a filter on a search form, the resulting URL structure will use URL parameters like this. One alternative here is to create custom Pages that represent each possible combination of destinations and activities, and place a View on each Page that is filtered by the proper criteria. These Pages all get added to your site map, and can be linked to using custom menu links or simple HTML links in your content. It's not automated or efficient, unfortunately, but it's more friendly to SEO.

The second problem is to do with filtering by archive...it only filters by the first taxomomy and not the second.
It is possible to filter by a different taxonomy on a taxonomy archive, so we should be able to get this working as expected. Can you share a screenshot showing your entire WordPress Archive? I would like to see how you have the Loops Selection, Query Filters, and Filter Editor set up. Please expand each section so I can see all the settings and code.

Thank you.

#559115

Thanks for your reply. I am currently on holiday hence the slow reply. I am back in the office and can share screen shots next week. The taxonomy archive filtering sounds promising.

Regarding the menus I agree. The plan is a primary menu that works in the traditional sense and a secondary one that navigates deeper into the site. We have 2 major custom taxonomies- around 100 activities and 1000s of destinations (with more being added all the time) so a manual solution it not an option.

Furthermore we have 3 content/custom post types (and possibly more to come) which use the same taxonomies. How would you advise we utilise the power of toolset to create our site?

Thanks in advance

#559335

I think the real difficulty here is going to be your custom URL rewrites. Toolset isn't designed to work with these types of directory structures, or to help you manage rewrites. With that being said, if you are able to set up your own rewrites so that a Toolset View is displayed at all of these URLs, I can help you tweak the WP Query for this View to work within your URL structure.

For example, let's say you can set up your own custom rewrites so that all of these URLs actually load a single Page that includes a single View, and this View contains Query Filters for all the possible taxonomies. Based on your URL routing, you could then programmatically apply the proper filters to your View using the Views API and PHP. The wpv_filter_query hook can be used for this:
https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query

So if you're able to get to this point on your own, then I can step in and help with this filter. We will modify the query parameters so that the proper filters are applied automatically. No need to worry about new activities or destinations that get added - they will be automatically added to the filters.

#562000

Hi Christian
Thanks again for your reply and your offer to help tweak the WP query etc. Apologies for the slow reply it got lost in the mass of stuff to deal with when i got back from holiday last week.

Just to summarise so I am sure I understand.

1. We can filter an archive by another taxonomy creating pages that just show an activity in a destination eg 'snowboarding' + 'europe'

2. This kind of view will work on the native WP URL structure eg hidden link if I understand you correctly this will need a small tweak to the WP filter which you can help with?

3. We already have code to rewrite the WP native URLs to our structure hidden link so the redirects won't be a problem

4. The primary navigation is not a problem (eg selecting an activity or a destination) but secondary (eg if you have selected an activity but want to narrow down by destination so going from hidden link to hidden link
or from hidden link to hidden link will be more difficult as toolset is not made to do that. You said a custom approach would be required do you know what we could use or how it could be done? We already have a menu that does this on the existing site but it is not very user friendly, however it does work for SEO so all pages get indexed.

5. We could utilise the powerful parametric/custom search functions to have a user friendly way for site visitors to find the content they want to find, possibly have the whole search no-index so google does not get confused with lots of similar pages.

So in conclusion we can't do this out of the box, but with code we already have plus a little help from you we could probable make it work and utilise the power of toolset to manage it all.

If we did this would any updates be likely to break the custom code we have used?

Thanks again for your help.

Luke

#562038

1. We can filter an archive by another taxonomy creating pages that just show an activity in a destination eg 'snowboarding' + 'europe'
That's correct.

2. This kind of view will work on the native WP URL structure eg hidden link if I understand you correctly this will need a small tweak to the WP filter which you can help with?
The URL structure will use Toolset-specific parameters, not necessarily 'activity' and 'destination'. I can help you add some custom PHP which will capture the parameter values from a URL like this and translate them into filters that a View can understand.

3. We already have code to rewrite the WP native URLs to our structure hidden link so the redirects won't be a problem
Okay sounds good.

4. You said a custom approach would be required do you know what we could use or how it could be done?
You might be able to use Views to build submenus like this. You can use a View of a Taxonomy to loop over all the destination terms and display links to each term using relative paths, based on the term slug. For example, if you are on the /activity/snowboarding page and you want to display a submenu of destinations, each destination link could be set up to append "destination/slug" to the current URL, resulting in end URLs like /activity/snowboarding/destination/europe. This would all be automated, so adding and removing destination terms will update the menu items in your View.

It could get tricky if you have more than one submenu to display on a single page, because of the URL structures required. I would need to know more about the rewrites, and if the order of those parameters is important. Is it required to be holiday, destination, category, or can the order of these terms be different? Will you have multiple submenus on any page?

If we did this would any updates be likely to break the custom code we have used?
Any time custom code is used there is the potential for unforeseen conflicts in updates, so always back up your site before updating and we can help you with any problems that arise. It's best to set up a staging environment with a clone of your site so you can test updates before you push them to your production environment. Since we will be using a documented API method wpv_filter_query, the likelihood that our filter will suddenly break is fairly low. Breaking changes to these APIs are not common, and updates are usually backwards compatible. However, custom code will be used that relates to your custom URL paths and parameter conversion. Since these are not documented features, there is more of a chance that some new feature or update in the future will cause a problem that is impossible to predict. If a problem is introduced there, then our filter will fail - not because the filter is broken, but because it stops receiving the data it expects.

#564633

Hi Christian

Many thanks again for your feedback. I have met with my business partner about this to discuss how to move forward.

He had an interesting question. At the start of our conversation you used Amazon as an example. His question is 'How would you go about building an Amazon style site using Toolset?'

Thanks

Luke

#564825

How would you go about building an Amazon style site using Toolset?
You would have to break this up into many, many more detailed questions in separate tickets. We offer integration with WooCommerce on many levels, so check out these guides:
https://toolset.com/learn/create-an-ecommerce-wordpress-site/
https://toolset.com/learn/create-an-ecommerce-wordpress-site/single-product/
https://toolset.com/documentation/user-guides/getting-started-woocommerce-views/

You can interact with a WooCommerce demo site using this guide:
https://toolset.com/reference-site/toolset-woocommerce/

If you need further assistance, please open separate tickets with specific, detailed questions. Thanks!

#564884

Thanks Christian!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.