hugoC-3
Support threads created in the last 30 days: 0
Favorite Forum Topics
This user has no favorite topics.
Forum Topics Created
Status | Topic | Supporter | Voices | Posts | Freshness |
---|---|---|---|---|---|
custom sized thumbnzil images don't appear
Started by: hugoC-3 in: Toolset Professional Support |
2 | 6 | 5 years, 11 months ago | ||
Valid site key not accepted
Started by: hugoC-3
in: Toolset Professional Support
Problem: Solution: You can find the proposed solution, in this case, with the following reply: Relevant Documentation: |
2 | 7 | 6 years ago | ||
Loop with different numbers of items
Started by: hugoC-3
in: Toolset Professional Support
Problem: Solution: You can find proposed solution, in this case, with the following reply Relevant Documentation: |
2 | 7 | 6 years, 7 months ago | ||
Custom redirect URI for cpt?
Started by: hugoC-3 in: Toolset Professional Support |
1 | 2 | 6 years, 10 months ago | ||
Single post view – how to manually select a specific post
Started by: hugoC-3
in: Toolset Professional Support
Problem: I would like to use a View to show information about a single post. I know the post ID and I would like to pass that ID into the View's filter using a shortcode attribute. Solution: Use the Query Filter panel in the View editor screen to apply a filter by post ID, set by a shortcode attribute. Pass the desired post ID into the View shortcode using the standard attribute "ids", or modify the settings in the Query Filter to match a custom attribute you have already applied to your shortcode. Relevant Documentation: |
2 | 3 | 6 years, 10 months ago | ||
Conditionally display image in archive page
Started by: hugoC-3
in: Toolset Professional Support
Problem: The issue here is that the user wanted to conditionally display some images based on the taxonomy attached to a post on an Archive layout. Solution: It won't be exactly possible to do with the taxonomy archive, with the general archive like that. Instead it is possible on the individual term archive. The reason is because you are going to need to know individually which term is attached to the current post being listed. So in the archive it won't be possible. It is possible to do with a multiple view setup. Where at first you will need a view to first list the taxonomy terms in that taxonomy. Then a second view to list all the posts that belongs to each of those taxonomies. Take a look at this documentation below. From the example you see there are 4 categories Technology,Sport,Environment,Auto and that each is listing their relevant posts below them. |
2 | 5 | 6 years, 10 months ago | ||
[Views] Show only posts from current category, not subcategories in taxonomy View
Started by: hugoC-3
in: Toolset Professional Support
Problem: I would like to create a View that shows posts that are associated to a specific term, but not its child terms. Solution: Add the following custom code to your child theme's functions.php file: add_filter( 'wpv_filter_query', 'only_term_filter',99,3 ); function only_term_filter( $query_args, $views_settings, $view_id) { $view_ids = [12345,67890]; if (in_array($view_id, $views_ids)){ foreach($query_args['tax_query'] as $tq) { if( isset( $tq['taxonomy'] ) ){ $tax = $tq['taxonomy']; $term = get_term_by('id', $tq['terms'][0], $tax); $termChildren = get_term_children($term->term_id, $tax); $query_args['tax_query'][] = array( 'taxonomy' => $tax, 'field' => 'id', 'terms' => $termChildren, 'operator' => 'NOT IN' ); } } } return $query_args; } Replace 12345,67890 with a comma-separated list of View IDs where you want to apply this filter. Make sure your View's taxonomy filter is set up to respond to a shortcode attribute, something like "wpvcategory". Then pass the top-level term slug into the shortcode attribute like this: [wpv-view name="your-view-slug" wpvcategory="parent-term"] The View will return posts with the top-level term applied, but no posts that have to its child terms. Relevant Documentation: |
2 | 3 | 6 years, 11 months ago | ||
[Views] Maps disappeared after migrating site
1
2
Started by: hugoC-3
in: Toolset Professional Support
Problem: Solution: This can be caused by one of 2 issues or both. The first is that the url of the website might have changed and if you are using a restricted google maps api key then you will need to change update the key to be used with the new url. The second is that there could be some code in the theme or other plugins that is causing a conflict or throwing a Javascript error due to the new server environment. In this case it was the user's child theme that was causing the issue. |
2 | 21 | 6 years, 11 months ago |