All screens come from our Premium Responsive Drupal theme Best Brand. Best Brand is a complete Drupal distribution including several modules, content types, view pages, view blocks, pre-configured image styles as well as a premium theme tailored together to achieve its functionality. It comes with an installation profile that allows you to have a fully-functional site up and running in few minutes.
Best Brand comes with the build in Product content type. Product content type comes with several fields - one of them is the Product Categories field (field_product_category).
![](http://assistly-production.s3.amazonaws.com/33591/portal_attachments/207090/related-1_original.jpg?AWSAccessKeyId=AKIAJNSFWOZ6ZS23BMKQ&Expires=1579965163&Signature=EaJwIgOgH6lf2kyQ4C9tOpoIzIo%3D&response-content-disposition=filename%3D%22related-1.jpg%22&response-content-type=image%2Fjpeg)
Best Brand presents a Related Products (OTHER PRODUCTS IN CATEGORY) block alongside the product your visitor's looking at. Which, needless to say, is exactly what a product listing theme should do. Creating a block of links for related products is a useful way to keep visitors engaged in the selected Product Category to have them to continue reading.
![](http://assistly-production.s3.amazonaws.com/33591/portal_attachments/207092/related-2_original.jpg?AWSAccessKeyId=AKIAJNSFWOZ6ZS23BMKQ&Expires=1579965164&Signature=%2Fqy%2Fxuqsi6ttmjJ8j2rQcp%2BGEeg%3D&response-content-disposition=filename%3D%22related-2.jpg%22&response-content-type=image%2Fjpeg)
The following block will work for you even if the maximum number of values users can enter for this field is 1 or unlimited.
![](http://assistly-production.s3.amazonaws.com/33591/portal_attachments/207093/related-7_original.jpg?AWSAccessKeyId=AKIAJNSFWOZ6ZS23BMKQ&Expires=1579965165&Signature=jGnujml2qQCVYLZoLn6Nj9JY6Eg%3D&response-content-disposition=filename%3D%22related-7.jpg%22&response-content-type=image%2Fjpeg)
![](http://assistly-production.s3.amazonaws.com/33591/portal_attachments/207094/related-8_original.jpg?AWSAccessKeyId=AKIAJNSFWOZ6ZS23BMKQ&Expires=1579965166&Signature=Q2KqYsoYDvZebcCVwWCuqCzmOck%3D&response-content-disposition=filename%3D%22related-8.jpg%22&response-content-type=image%2Fjpeg)
How to create this Related Posts block with Views
1. Add/Create a new View block through Home » Administration » Structure » Views2. Add the Content: Fields you need under FIELDS and filter your results to a specific content type under FILTER CRITERIA - Content: Type (= Product)
![](http://assistly-production.s3.amazonaws.com/33591/portal_attachments/207095/related-3_original.jpg?AWSAccessKeyId=AKIAJNSFWOZ6ZS23BMKQ&Expires=1579965167&Signature=ziqIFFEpUK7MfNgEl0jiz%2Fx4im8%3D&response-content-disposition=filename%3D%22related-3.jpg%22&response-content-type=image%2Fjpeg)
3. Add the Contextual Filter: Content: Has taxonomy term ID (with depth) and Apply this filter after the following configuration:
- Allow multiple values
- When the filter value is NOT available
Provide default value: Taxonomy term ID from URL
Load default filter from node page, that's good for related taxonomy blocks
Limit terms by vocabulary
Filter to items that share all terms
![](http://assistly-production.s3.amazonaws.com/33591/portal_attachments/207096/related-4_original.jpg?AWSAccessKeyId=AKIAJNSFWOZ6ZS23BMKQ&Expires=1579965168&Signature=ss1t5SSzgoG84%2FvG5Cv%2B8XePazg%3D&response-content-disposition=filename%3D%22related-4.jpg%22&response-content-type=image%2Fjpeg)
- When the filter value is available or a default is provided
Specify validation criteria with Validator: Basic validation
![](http://assistly-production.s3.amazonaws.com/33591/portal_attachments/207097/related-5_original.jpg?AWSAccessKeyId=AKIAJNSFWOZ6ZS23BMKQ&Expires=1579965169&Signature=Ds0wNKhsba4jG7WSuoMr77jaYf8%3D&response-content-disposition=filename%3D%22related-5.jpg%22&response-content-type=image%2Fjpeg)
4. In order to exclude the current node, add a second Contextual Filter: Content: Nid and Apply this filter after the following configuration:
- When the filter value is NOT available
Provide default value: Content ID from URL
- Under “More”, check “Exclude”
![](http://assistly-production.s3.amazonaws.com/33591/portal_attachments/207098/related-6_original.jpg?AWSAccessKeyId=AKIAJNSFWOZ6ZS23BMKQ&Expires=1579965170&Signature=A2i5yZhCof5HK0%2BbxEMeInIUazQ%3D&response-content-disposition=filename%3D%22related-6.jpg%22&response-content-type=image%2Fjpeg)
5. Save your changes and place your block inside a Drupal region.
In case this article leaves any of your questions or concerns unanswered, please feel welcome to email us or post a public question.
More than (just) Themes
http://www.morethanthemes.com/