The customer created a view with two query filters: (1) the page must be a subpage of the page on which the view resides, and (2) the custom field "Card Exclude" must not have the value "1." Despite having four subpages, with only one marked as excluded, the view displayed no pages. Additionally, the unchecked state of the checkbox field was not saving a value to the database.
Solution:
The issue stemmed from how checkbox field values were stored in the database. If the checkbox was never saved, it remained absent in the database. If checked and then unchecked, it stored a value of 0, while being checked saved a value of 1. The workaround applied involved manually saving the field as true (1) and then unchecking it to store false (0), allowing the query filter to function correctly. Additionally, two other solutions were suggested:
1- Using a conditional statement in the Loop Editor: [wpv-conditional if="( $(wpcf-exclude-card) ne '1' )"].
2- Custom code in the query to handle cases where the field might be NULL or 0.
The customer created a multilingual directory using Toolset to organize 'Contacts', 'Locals', and 'Employers' in a one-to-many relationship, with metadata categorizing roles. The English version of the directory page displayed correctly, but the French version showed a 'No items found' message, despite translated records and metadata.
Solution:
The issue was traced to a custom filter applied in the Toolset settings under Code Snippets. This filter used English terms (e.g., 'national-president') in the query, which prevented it from retrieving translated French records (e.g., 'président-e-national-e'). Disabling the snippet temporarily allowed French results to display. The snippet needs updating to include the French position names to ensure multilingual compatibility.
The customer reported seeing an error message on their site stating, "You are using an expired account of Toolset," despite having a renewed license. Additionally, the Toolset menu was missing from their WordPress admin dashboard, preventing access to essential features.
Solution:
For the expired account issue, registering it again fixed the issue.
Later, it was discovered that the issue was due to a custom code snippet implemented in the Code Snippets plugin, which hid specific admin menus, including Toolset, unless a certain user was logged in. Disabling the Code Snippets plugin temporarily revealed the hidden Toolset menus. The customer was advised to review and deactivate unnecessary snippets to resolve the issue permanently.
The customer was attempting to use a shortcode to display a custom field (CPF) conditionally within the Divi Theme Builder’s tab module. While the shortcode functioned correctly outside the Theme Builder, it only displayed the raw shortcode within the builder, failing to render the expected content. The issue appeared to stem from Divi’s Theme Builder potentially overwriting post variables required by shortcodes.
Solution:
A workaround was suggested due to the limitations in Divi’s handling of shortcodes within the Theme Builder. A custom PHP function was created and added to the theme's functions.php file to handle the conditional logic and output the custom field directly:
function display_reisekosten_func() {
if (get_post_meta(get_the_ID(), 'wpcf-reisekosten-pauschal-individuell', true) == '1') {
return '<h2>Reisekosten</h2>' . do_shortcode('[types field="reisekosten-min-km"][/types]');
}
}
add_shortcode('display_reisekosten', 'display_reisekosten_func');
The shortcode [display_reisekosten] could then be used within a Divi Code Module to render the content conditionally. While not a guaranteed solution, this approach provided a viable alternative until Divi resolves the underlying issue.
The customer was upgrading their site running Toolset Version 2.3.5 to the latest version while also updating PHP to version 7.x. They needed guidance on the upgrade path and encountered issues displaying custom fields with legacy PHP code after the update. Despite the fields being visible in the Classic Editor, embedding Toolset shortcodes in the editor caused site crashes when running PHP 8.2.
Solution:
Solution:
1- Upgrade Path: It was recommended to deactivate and delete the old version of Toolset, update PHP to version 7.x, install the new Toolset version, and import custom fields if necessary. The customer's data was safely retained in the WordPress database throughout this process.
2- Custom Field Display:
To replicate the legacy PHP logic, it was advised to use Toolset Views with conditional shortcodes, such as:
3- Compatibility Notes: The customer was advised to update the PHP retrieval methods to align with current standards and replace older code constructs. The errors reported were related to the use of the continue statement and outdated plugin code.