I am trying to use the default_label attribute with the [wpv-control-postmeta] shortcode to display a default "All" option for a checkbox custom field. Despite following the documentation, the default_label attribute isn't functioning as expected, and adding the option through jQuery is proving complex.
Solution:
Checkbox fields do not natively support a "select all" option via the default_label attribute. Instead, add a custom checkbox labeled "All" manually and use the wpv_filter_query hook to modify the query when this option is selected. Check the $_POST object to identify when "All" is selected and update the query args accordingly.
I am trying to resolve an issue where the 'Favorites' (Bookmark) button appears multiple times on the same page, instead of just once at the top as expected. The button seems to appear whenever a 'Single Field' dynamic data block is used.
Solution:
The issue occurs because the 'Favorites' plugin likely injects the Bookmark button via the "the_content" filter, which also affects WYSIWYG fields. To prevent this, insert the WYSIWYG fields via a shortcode with the suppress_filters='true' attribute to stop third-party filters from applying.
The customer encountered a message related to a Toolset license key and needed assistance to understand how to manage site registration and the use of the key.
Solution:
We explained that if the site is registered as a development site, it must be "published" to convert it to a production site. This can be done from the WordPress dashboard or the Toolset account page. The license key is used to validate the Toolset license and can be entered via the WordPress admin under Plugins > Add New > Commercial tab > (Un)Register Toolset link. The green check marks indicate that the plugins are up-to-date, while red checks signify that updates are needed.
The customer purchased Toolset and WPML, set both to development mode, and wants to switch to production mode in preparation for going live with a different domain next week. They were unsure of the benefits of development mode and how to switch to production mode.
Solution:
We explained that development mode allows you to have three development licenses per production site, enabling site development and sharing WPML translation credits without needing a second license. The customer can change to production mode even in a staging environment by clicking the "change to production" icon in their Toolset and WPML account sites. If the switch does not work immediately, they might need to remove the key and re-add it as a production site.
The customer created a search view that displays two types: a custom post type (CPT) and standard WordPress posts. They needed to show only CPT entries published up to a week ago, while standard posts should be displayed regardless of their publication date. The customer struggled with configuring the date filter to apply only to the custom post type.
Solution:
We explained that it is not possible to use different date filters for different post types within the same filter by default. To achieve this, we used the wpv_filter_query hook to apply a custom code snippet that checks the post type and applies a date filter only for the custom post type ("listing"). The filter was set to show records published until 7 days ago while allowing modifications without affecting the filter criteria. The code was also updated to ensure it filtered only by the published date, not the modified date. The customer confirmed that the solution worked as expected.