|
How to show posts of a related custom post type without duplicates?
Gestartet von: martinP-14
in: Toolset Professioneller Support
Quick solution available
Problem: I have three post types in the following relationships:
Company - Brand (one-to-many)
Brand - Post (many-to-many)
I would like to show a View of all the Posts related to a given Company, but I would like to ensure there are no duplicates displayed.
Solution:
1. Create a View of Posts and add a post relationship filter for the Brands-Posts relationship. Configure the post relationship filter so that the Post is related to "the current post in the loop". Use the Loop Wizard to create a "List with separators" output style. Insert the post ID shortcode in the loop. Remove everything inside the wpv-no-items-found shortcode.
2. Create a View of Brands and add a post relationship filter for the Companies-Brands relationship. Configure the filter so that the Brand is related to "the post where this View is shown". Use the Loop Wizard to create a "List with separators" output style again. This time, insert the View from step 1 in the loop. Again, remove everything inside the wpv-no-items-found shortcode.
3. Insert the View of Brands in the Company post template. You should see a comma-separated list of numbers appear. These numbers should be all the Post IDs related to all the Brands related to the current Company. It's okay if there are duplicates here, the next step will fix that.
4. Create a new View of Posts and add a post ID Query Filter, set by a shortcode attribute "ids". Use the Loop Wizard to design the list of Posts however you would like. For now, you can just insert the post title with link field so you can verify everything is working correctly.
5. Place the new View of Posts in the Company post template using a shortcode, and add the "ids" shortcode attribute. Place the View of Brands shortcode in the value of the ids shortcode attribute, like this:
[wpv-view name="Your New View of Posts" ids="[wpv-view name='Your View of Brands']"]
Now the list of related posts should appear in the Company template.
Relevant Documentation:
https://toolset.com/documentation/user-guides/views/passing-arguments-to-views/
|
|
2 |
3 |
vor 5 Jahren
martinP-14
|
|
When to use custom fields and when to use custom taxonomies?
Gestartet von: martinP-14
in: Toolset Professioneller Support
Quick solution available
Problem: I would like to know when I should use a custom taxonomy vs when I should use a custom field. What are the advantages and disadvantages of each?
Solution:
One advantage of a taxonomy - archives can be generated automatically. There are no archives generated automatically for custom fields, though you could create them manually with Views and custom Pages.
Aadding a taxonomy item is fast - faster than the alternative.
With a (non-hierarchical) taxonomy I can add several, comma-seperated brands/companies (while I have to check myself if the terms are the same...).
Post relationship queries are marginally slower than taxonomy term queries.
It is possible to add many taxonomy filters to a custom search View. It is not possible to add more than one post relationship filter to a custom search View.
It is not possible to capture all information effectively with taxonomy terms. For example, dates are not easily converted into terms, and you can create more complex queries with dates.
Toolset's post relationships are proprietary. Taxonomy terms are common to all WordPress sites by default, so 3rd-party tools are more likely to integrate with taxonomy terms than with post relationships.
|
|
2 |
3 |
vor 5 Jahren
martinP-14
|
|
Post featured image as a background image
Gestartet von: frankW
in: Toolset Professioneller Support
Quick solution available
|
|
2 |
5 |
vor 5 Jahren
frankW
|
|
load taxonomies within button tag (each taxonomie as one button)
Gestartet von: alexanderL-2
in: Toolset Professioneller Support
Quick solution available
|
|
2 |
3 |
vor 5 Jahren
alexanderL-2
|
|
Types backend fields are not showing up after WP Update to 5.3
Gestartet von: Peter
in: Toolset Professioneller Support
|
|
3 |
3 |
vor 5 Jahren
Lime Valley
|
|
Javascript im Backend für CPT einsetzen
Gestartet von: Andreas
in: Toolset Professioneller Support
|
|
2 |
4 |
vor 5 Jahren
Beda
|
|
Search and Editor
Gestartet von: gruppe-am-park-gmbhM-2
in: Toolset Professioneller Support
|
|
2 |
6 |
vor 5 Jahren, 2 Monaten
gruppe-am-park-gmbhM-2
|
|
Shortcode
Gestartet von: marcelB-4
in: Toolset Professioneller Support
|
|
2 |
22 |
vor 5 Jahren, 2 Monaten
Beda
|
|
Accordion & Pagination
Gestartet von: richardB-14
in: Toolset Professioneller Support
|
|
2 |
5 |
vor 5 Jahren, 3 Monaten
Beda
|
|
Ich habe das Toolset registriert, kann aber Toolset Types nicht aktualisieren.
Gestartet von: melanieS-7
in: Toolset Professioneller Support
|
|
2 |
2 |
vor 5 Jahren, 3 Monaten
Beda
|
|
View – Custom search – Add additional search-requirement
Gestartet von: reimundH
in: Toolset Professioneller Support
|
|
2 |
8 |
vor 5 Jahren, 4 Monaten
reimundH
|
|
Views Order by Datefield
Gestartet von: PLI
in: Toolset Professioneller Support
Quick solution available
|
|
2 |
5 |
vor 5 Jahren, 4 Monaten
PLI
|
|
WP-Views is not working as expeded with ajax
Gestartet von: philipK-2
in: Toolset Professioneller Support
|
|
2 |
9 |
vor 5 Jahren, 7 Monaten
philipK-2
|
|
Elementor Toolset view widget
Gestartet von: BorisG4880
in: Toolset Professioneller Support
|
|
2 |
3 |
vor 5 Jahren, 9 Monaten
BorisG4880
|
|
how to Exclude child term category taxonomy posts with views
Gestartet von: desightS
in: Toolset Professioneller Support
Quick solution available
|
|
3 |
8 |
vor 5 Jahren, 9 Monaten
desightS
|