jonB-5
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 |
---|---|---|---|---|---|
Javascript to hide/show div in View loop item targeting first result only
Started by: jonB-5
in: Toolset Professional Support
Problem: Solution: |
2 | 5 | 6 years, 5 months ago | ||
Need a header placed below the fold to stick to the page top when scrolled past
Started by: jonB-5
in: Toolset Professional Support
Problem: I'm using a sticky header plugin to help "stick" the title of a post at the top of the screen once I scroll past it, but I can't get the plugin to work with Toolset. Solution: In the Toolset environment, jQuery is represented by the variable 'jQuery' instead of '$', so you must replace any instance of the '$' variable with 'jQuery' in your initialization code. Then you must calculate the correct initialization height based on the placement of the title and the menu height. See the attached screenshot below. jQuery(document).ready(function() { jQuery(window).bind('scroll', function() { // your code here using jQuery instead of $ // ... }); }); |
2 | 5 | 6 years, 6 months ago | ||
Show a post if it has a parent of one type but not a parent of another type
Started by: jonB-5 in: Toolset Professional Support |
2 | 4 | 6 years, 8 months ago | ||
Need to be able to use both 'OR' and 'AND' in the same View filter
1
2
Started by: jonB-5 in: Toolset Professional Support |
2 | 29 | 6 years, 8 months ago | ||
Apply Two Filters To One Field In Custom Search
Started by: jonB-5
in: Toolset Professional Support
Problem: I have a custom search View with a date range filter. I would like to limit the minimum date to be today's date. By default, I would like to have today's date selected, but I would like to allow users to select a later date. Solution: The best solution is to update to the latest plugin versions, where you can specify a default value for the minimum date. JavaScript code that will disable dates earlier than today: jQuery(document).ready( function() { jQuery('.wpv-date-front-end[data-param=wpv-wpcf-yourstartdateslug]').datepicker('option', 'minDate', new Date()); }); If you are unable to update to the latest plugin versions, the following code can be added to functions.php to enforce the minimum date: add_filter( 'wpv_filter_query', 'enforce_minimum_start_date', 1000, 3 ); function enforce_minimum_start_date ( $query, $view_settings, $view_id ) { if( $view_id == 7 ) { $exists = false; $metaQuery = array(); $args = array( array( 'key' => 'wpcf-start-date', 'value' => date('U'), 'compare' => '>=', 'type' => 'NUMERIC')); if ( isset($query['meta_query']) ) { foreach($query['meta_query'] as $meta) { if(isset($meta['key']) && $meta['key'] == 'wpcf-start-date'){ $exists = true; } } if(!$exists) { $metaQuery = $query['meta_query']; } } if(!$exists) { $metaQuery[] = $args; $query['meta_query'] = $metaQuery; } } return $query; } Relevant Documentation: https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-filter-query |
2 | 5 | 6 years, 8 months ago | ||
Customise Display of Select Filter Options
Started by: jonB-5 in: Toolset Professional Support |
2 | 2 | 6 years, 9 months ago | ||
Views Looks at Wrong URL on AJAX Reload
Started by: jonB-5 in: Toolset Professional Support |
2 | 2 | 6 years, 10 months ago | ||
Many-to-Many Post Remains Published in View When an Associated Post is Deleted
Started by: jonB-5 in: Toolset Professional Support |
2 | 6 | 6 years, 11 months ago | ||
Integrating Types Product Field Input With WC Vendors Product Creation
Started by: jonB-5 in: Toolset Professional Support |
2 | 12 | 6 years, 11 months ago | ||
[wpv-woo-product-price] does not work through a many-to-many relationship
Started by: jonB-5 in: Toolset Professional Support |
2 | 6 | 6 years, 11 months ago | ||
Creating a View That Displays Products With a Field Matching the Current Post ID
Started by: jonB-5
in: Toolset Professional Support
Problem: I would like to create a View that shows Products, filtered by a custom field. The custom field should match the ID of the page where the View is placed. How can I accomplish this? Solution: Create a custom field for Products. In each product, set the custom field value to match the ID of the page where you want them to display. Then, create a View of Products filtered by a shortcode attribute. Place the current page's ID in the value of the shortcode attribute when you place your View on the page. [wpv-view name="my-products-view-slug" mycustomfield="[wpv-post-id]"] Relevant Documentation: https://toolset.com/documentation/user-guides/passing-arguments-to-views/ |
2 | 6 | 7 years ago |