Skip Navigation

[Resolved] Setting up a site about topics with Toolset

This support ticket is created 6 years, 11 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 3 replies, has 2 voices.

Last updated by Christian Cox 6 years, 11 months ago.

Assisted by: Christian Cox.

Author
Posts
#595576

Hi,

I'd like to set up a site with topics about different entities.
I haven't decide it yet what custom post types (CPT) and what CPT relations should I use?

My option #1:
I use only 1 CPT called Topics, not separating the different entity types with using them as different CPTs.

My option #2:
I use 1 CPT called Topics and I'd use different CPTs for different entity types like:
Places, Events, Local Businesses etc. setting up their CPT relations also

So a Topic would be related to other entities,
eg.: is about the "Barcelona Soccer Team's performance in the Spanish Soccer Championship in the 2017-2018 season".
(this means 3 other entities considered also as a Topic:
- Barcelona Soccer Team
- Spanish Soccer Championship
- 2017-2018 season

So what I'd like a Topic page look like:
Topic content
related Topics easily searchable and selectable, sortable by standard sorting methods like newest, best rated etc.

What I consider now as a good idea:
1) Create only 1 CPT named Topics
2) Create a non-hierarchical Toolset taxonomy related to Topics and named like Topics Tag
3) Adding Topics Tags to every each Topics. Speaking about the example above:
adding to:
Topics: "Barcelona Soccer Team's performance in the Spanish Soccer Championship in the 2017-2018 season"
Topics Tags added: "Barcelona Soccer Team", "Spanish Soccer Championship", "2017-2018 season"
4/a) Insert a Tag Cloud using 3rd party plugin (non-Toolset) displaying Topic Tags below the Topic content
or
4/b) Insert a Filterable list of related Topics (created by Views) below the Topic content

What do you think is the best idea to do it? Pls. don't stick to my ideas shared here if you also have a good idea!

Thank you,
Best,
v.

#595730

I think you're taking the correct approach. Use 1 CPT and then use a custom taxonomy to represent the different entities. Taxonomies are easily filtered by Views, and archive pages will be generated automatically for each entity. You can design those pages using Views WordPress Archives. See my additional comments below:

Create a non-hierarchical Toolset taxonomy related to Topics and named like Topics Tag
I think a hierarchical taxonomy could work too, it just depends on how you want to organize your entities. But flat seems fine.

related Topics easily searchable and selectable, sortable by standard sorting methods like newest, best rated etc.
Sorting by post date is definitely possible with Views. Best-rated will require a bit more work, because there's no rating mechanism built in to Toolset or WordPress core. You could build one yourself using CRED, or you could implement a 3rd-party rating system. In order to easily sort a View by its rating, the rating must be stored as a postmeta value for each post. Otherwise some custom code will be required.

Insert a Tag Cloud using 3rd party plugin
This is a good way to link to entity archives, but not link to individual posts. I guess it just depends on how your users will want to browse. Also, Views can create a list of all the entities assigned to the current post, and generate basic links to each entity archive. If a basic list of links is good enough, that's definitely possible with Views:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-taxonomy

or...Insert a Filterable list of related Topics (created by Views) below the Topic content
This is a good way to let a User jump between related entities easily. It might be useful to include both the tag list and the View, to give your Users different options.

#595868

Hi Christian,

thank you for your useful response.

Let me keep thinking together...

So we'll have 1 CPT ( Topics), we'll have surely a flat taxonomy (Topic Tags), but I don't exclude Topic Categories for later usage.

Related Topics must be found and reached easily.
I might use Relevanssi Pro for advanced searching in Related Topics, but for the advanced browsing and filtering I:
- either use a premium filtering plugin I've already had, or
- use Views

Can Views do such filtering (with Topic Tags), which elsewhere named faceted browsing or layered navigation?
Explaining it with the example above:
(
Topic: "Barcelona Soccer Team's performance in the Spanish Soccer Championship in the 2017-2018 season"
Related Topics displayed as a Topic Tag Cloud or list:
- A) Barcelona Soccer Team
- B) Spanish Soccer Championship
- C) European Champions League
- D) 2017-2018 season
)

So one who watched the original Topic (which is related to other Topics: A, B, D, but not C), decides to switch from Spanish League to European Champions League, so he wants to browse Topics which are Topic Tagged with: A, C, D!
So - I suppose - on Tag Cloud or list he will disable some Topic Tags (B) and enable other(s) (C), and he would get an archive (sortable and further filterable list of Topic Titles, maybe with some metadata in the list (like author of Topic, overall rating or comments number), with clickable links from Topic titles...

It is how a good webshop or marketplace works ( Ebay, Amazon, etc.), using the layered navigation, further filtering the already filtered result, allowing user to change one or some of the filter parameters but keep others...

So how can I do it very easily with Views?

Thank you,
Best,
V.

#596037

If you want users to be able to add and remove filters to find results with the updated search criteria, the only way to do that is with a parametric search View. Here's a brief guide:
https://toolset.com/documentation/getting-started-with-toolset/filter-content-lists-and-add-custom-search/

The general idea is that you add a parametric search View (just the search form part) to your Topic single post Content Template. This means that whenever a Topic post is displayed, the search form will be included. When the form is submitted, you can redirect Users to another page where the entire View (search form and results) will be displayed. Then they can click one of the result links and go to that Topic post page.

Adding the parametric search form to each Topic single post page is fairly straightforward, you insert your parametric search View in the Topic Content Template and select the "show only the search form" option in the GUI. However, a parametric search form does not automatically reflect the criteria of the current post. In other words, the entities associated with the current Topic will not be checked in the search form filters by default.

Entities are taxonomy terms. In a parametric search View, these terms are filtered using a taxonomy filter control. In order to preselect values for a taxonomy filter control, you must use URL parameters to specify the values that should be preselected. So if you construct links to your Topic pages with those URL parameters defined, the parametric search form will be preset with the entities associated with the current Topic. Here's an example of how the URL to the Topic 1 page would be constructed if Topic 1 was associated with Entity 1 and Entity 2:

yoursite.com/topic/topic-1/?wpv-entity%5B%5D=entity-1-slug&wpv-entity%5B%5D=entity-2-slug

More info about the taxonomy filter control:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-control-post-taxonomy