|
Content templates with Elementor
Started by: andreaV-4
in: Toolset Professional Support
Quick solution available
Problem:
The customer inquired whether it is possible to create content templates using Elementor.
Solution:
We confirmed that Toolset is compatible with Elementor and that it is indeed possible to create content templates using Elementor. We provided a tutorial link with a step-by-step guide, including screenshots, to assist the customer in setting it up.
Relevant Documentation:
https://toolset.com/course-lesson/using-toolset-with-elementor-page-builder/
|
|
2 |
2 |
3 months, 3 weeks ago
Mateus Getulio
|
|
Editing a particular record on the frontend
Started by: yehudaL
in: Toolset Professional Support
Quick solution available
Problem:
The customer wanted to allow coaches, defined as CPTs, to edit their own records using Toolset Forms. He explored two potential methods but was unsure how to implement them using Toolset, especially since he uses the legacy version of Views. The primary challenge was to ensure each coach could only edit their own record without using the standard WordPress authentication system.
Solution:
We suggested using a unique URL with a secret parameter to allow coaches to access and edit their records. The steps include:
Adding a custom field (coach_secret) to each coach's profile.
Generating and sending a unique URL to each coach containing the secret parameter.
Creating a custom shortcode to handle the secret verification and display the form pre-filled with the coach's details.
Implementing a custom function to validate the secret parameter against the coach_secret field.
Here is a simplified version of the custom code used:
add_shortcode('show_edit_coach_form', function() {
if (isset($_GET['secret'])) {
$secret = sanitize_text_field($_GET['secret']);
$args = array(
'post_type' => 'coach',
'meta_query' => array(
array(
'key' => 'wpcf-secret',
'value' => $secret,
'compare' => '='
)
)
);
$query = new WP_Query($args);
if ($query->have_posts()) {
while ($query->have_posts()) {
$query->the_post();
$post_id = get_the_ID();
echo do_shortcode('[cred_form form="edit-coach-form" post="' . $post_id . '"]');
}
wp_reset_postdata();
} else {
echo 'Invalid URL or no matching coach found.';
}
} else {
echo 'No URL parameter provided.';
}
});
|
|
2 |
5 |
3 months, 4 weeks ago
yehudaL
|
|
Use AND when filtering by custom taxonomy
Started by: lucyD
in: Toolset Professional Support
Quick solution available
Problem:
The customer needed to filter posts in her directory by a custom taxonomy called Features, ensuring that only posts with all selected tags were displayed (using an AND operator instead of OR).
Solution:
We determined that Toolset Blocks does not natively support changing the operator from OR to AND for multiple select fields. As a workaround, we enabled legacy views and configured the custom search to use the AND operator. Additionally, we used custom code with the wpv_filter_query filter to change the operator to AND. The specific code was added to the theme's functions.php file, targeting the correct view_id:
add_filter('wpv_filter_query', 'custom_taxonomy_query_operator', 10, 3);
function custom_taxonomy_query_operator($query_args, $view_settings, $view_id) {
if ($view_id == 509) {
if (isset($query_args['tax_query'])) {
foreach ($query_args['tax_query'] as &$tax_query) {
if (isset($tax_query['operator']) && $tax_query['operator'] == 'IN') {
$tax_query['operator'] = 'AND';
}
}
}
}
return $query_args;
}
|
|
2 |
7 |
4 months ago
Mateus Getulio
|
|
Targetting View item with [wpv-item index=""]
Started by: Paul
in: Toolset Professional Support
Quick solution available
Problem:
The customer wants to target and apply different code to specific items in a View loop, specifically targeting items 1-6 with one code and items 7 and beyond with a different code (including adding a data attribute for lazy load).
Solution:
We suggested using the [wpv-loop-index] shortcode along with the [wpv-conditional] shortcode to conditionally apply code to items based on their index within the View loop. The provided example shows how to use these shortcodes to target items with an index less than or equal to 6 with one code and items with an index greater than 6 with another code that includes the lazy load attribute.
For example:
[wpv-layout-start]
[wpv-items-found]
<!-- Target items with index less than or equal to 6 -->
[wpv-conditional if="( '[wpv-loop-index]' le '6')"]
<div class="item">
<!-- Your code for items 1-6 -->
</div>
[/wpv-conditional]
<!-- Target items with index greater than 6 -->
[wpv-conditional if="( '[wpv-loop-index]' gt '6')"]
<div class="item" data-lazy="true">
<!-- Your code for items with lazy load attribute -->
</div>
[/wpv-conditional]
[wpv-no-items-found]
<p>No items found</p>
[/wpv-items-found]
[wpv-layout-end]
Relevant Documentation:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-loop-index
|
|
2 |
3 |
4 months ago
Mateus Getulio
|
|
wpv-add-to-cart-message not diplaying on single product
Started by: pierre-yvesC
in: Toolset Professional Support
Quick solution available
Problem:
The customer reports that the "Added to Cart" message is not displaying correctly on their product page, even though a previous similar issue had been resolved. The initial troubleshooting step of toggling the AJAX add to cart buttons did not resolve the issue.
Solution:
I identified that the issue was caused by a specific line of code in the template that interfered with the wpv-add-to-cart-message shortcode:
[wpv-conditional if="( '[wpv-post-body]' eq '0' )" evaluate="false"]<h2>Description</h2>[/wpv-conditional]
To fix, I went ahead and changed the conditional to use a custom function:
The line in the template was changed to:
<div class="col-sm-8">[wpv-conditional debug="false" if="( wpv_conditional_post_has_content() eq '0' )"]<h2>Description</h2>[/wpv-conditional] </div>
I added the following check function to the theme's functions.php file:
function wpv_conditional_post_has_content($type, $object) {
$return = 0;
if ( $type == 'products' ) {
if ( empty( $object->post_content ) ) {
$return = 0;
} else {
$return = count($object->post_content);
}
}
return $return;
}
After that I tested it and the 'Description' title is being displayed correctly and so is the added to cart message.
|
|
2 |
9 |
4 months, 2 weeks ago
Mateus Getulio
|
|
Toolset / WPML issue
Started by: mariaR-3
in: Toolset Professional Support
Quick solution available
Problem:
The content on the blog archive page is not fully translated. A slider added to the archive template appears correctly in the default language (Spanish), but in other languages (e.g., English), a different slider from another plugin is shown. The archive pages sometimes show French as the default language instead of Spanish, indicating a potential conflict between WPML and Toolset.
Solution:
The customer discovered that the plugin "Post Types Order" by Nsp Code was causing the issue. This plugin created different template versions for each language and changed the default language of existing templates.
Deactivating and reactivating plugins one by one helped identify the culprit.
The customer removed the "Post Types Order" plugin, which resolved the issue.
|
|
2 |
18 |
4 months, 4 weeks ago
Mateus Getulio
|
|
Custom field not showing correct information
Started by: lesC
in: Toolset Professional Support
Quick solution available
Problem:
The customer wants to display a custom field (Distributer) on a custom post page, but the field only shows "Booktopia/Amazon" regardless of the actual content, even if the field is blank. Other custom fields are working correctly.
Solution:
I identified that the issue was with the Content Template where the value 'Booktopia/Amazon' was added as plain text instead of a dynamic field.
I replaced the static text with the correct shortcode [types field='distributor'][/types] to dynamically display the field's content.
After the change, the proper distributor value is being displayed correctly on the custom post pages.
|
|
2 |
3 |
4 months, 4 weeks ago
Mateus Getulio
|
|
Pagination on mobile device don't reload a new page
Started by: iginioV
in: Toolset Professional Support
|
|
2 |
4 |
5 months ago
Mateus Getulio
|
|
Divi theme + toolset search form
Started by: filippoC-2
in: Toolset Professional Support
Quick solution available
Problem:
The customer wants to insert a search form created with Toolset into the homepage of their site built with Divi. They have followed documentation for Gutenberg, but it is not applicable for Divi without losing their work. Additionally, they want to display search results in multiple columns instead of a single large column.
Solution:
To insert the search form into the Divi homepage, use the "wpv-view" shortcode:
[wpv-form-view name="View 1" target_id="123"]
Replace '123' with the ID of the page where search results should appear. Use the following shortcode on the results page:
[wpv-view name="View 1" view_display="layout"]
In the Divi editor, use a text or shortcode widget to place these shortcodes.
Relevant Documentation:
https://toolset.com/course-lesson/displaying-search-results-on-a-different-page/
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-view
|
|
2 |
4 |
5 months ago
Mateus Getulio
|
|
Help with WPML compatibility
Started by: talatcanU
in: Toolset Professional Support
Quick solution available
Problem:
The customer is using the WPML plugin to translate their website and encountering two major issues:
1- Images are not being displayed on some pages.
2- URLs are automatically adding a "." at the end, leading to 404 errors.
Solution:
1- URL Issue:
I identified and removed the extra character causing the URL issue by editing the view translation.
This resolved the broken links.
2- Image Display Issue:
The issue was caused by malformed HTML, specifically the custom HTML used to insert left and right arrow buttons in the sliders.
The Advanced Translation Editor was encoding the HTML tags, breaking the display.
Two possible workarounds were suggested: using actual Toolset components or registering the arrows as shortcodes.
I implemented the second workaround with the help of our 2nd tier support:
- Added a shortcode to functions.php to register the custom widget:
add_shortcode('glide_arrows', function () {
return '<div class="glide__arrows" data-glide-el="controls">
<button data-glide-dir="<" class="glide__arrow glide__arrow--left"><span class="tb-slider-left-arrow"></span></button>
<button data-glide-dir=">" class="glide__arrow glide__arrow--right"><span class="tb-slider-right-arrow"></span></button>
</div>';
});
- Registered the glide_arrows shortcode in Toolset settings.
- Edited the template containing the sliders and replaced the div with the arrow buttons with the [glide_arrows] shortcode.
This resolved the issue with the images.
|
|
2 |
19 |
5 months, 1 week ago
Mateus Getulio
|
|
Adding shapes to already rendered maps.
Started by: maxfieldB
in: Toolset Professional Support
Quick solution available
|
|
2 |
5 |
5 months, 2 weeks ago
Mateus Getulio
|
|
AJAX Search no working in a view
Started by: rubenM-3
in: Toolset Professional Support
|
|
2 |
11 |
5 months, 3 weeks ago
Waqar
|
|
Posts do not update after filters update
Started by: garenM
in: Toolset Professional Support
Quick solution available
Problem:
The customer reported that updating filter values triggers the fade effect, but the posts remain unchanged. This issue occurs on their articles and ebooks pages.
Solution:
To troubleshoot, we requested temporary admin login details and permission to create a staging version of the site for debugging. After initial investigations and involving our 2nd tier support, we created a new view for the Articles post type with an Ajax-enabled category filter. This view worked as expected without the customizations. We replicated this setup on the production site, creating an alternative view (Alt Articles) and recommended that the customer gradually apply their customizations to identify the step causing the issue.
|
|
2 |
10 |
5 months, 4 weeks ago
Mateus Getulio
|
|
Export toolset from this site to a new one
Started by: andresB-4
in: Toolset Professional Support
|
|
2 |
8 |
6 months ago
Waqar
|
|
I need help to setup taxonomy view
Started by: charitosA
in: Toolset Professional Support
|
|
2 |
12 |
6 months ago
charitosA
|