IntegrisDesign
Fils de soutien créés au cours des 30 derniers jours : 0
Sujets de forum favoris
This user has no favorite topics.
Sujets de forum créés
| Status | Topic | Supporter | Voix | Publications | Nouveauté |
|---|---|---|---|---|---|
|
Content Template Broke After Adding Gallery & Repeating Field
Commencé par : IntegrisDesign in: Toolset Professional Support |
|
2 | 6 | Il y a 1 year, 8 months | |
|
I need to have images popup in a lightbox
Commencé par : IntegrisDesign in: Toolset Professional Support |
|
3 | 5 | Il y a 1 year, 9 months | |
|
Secondary sort not working based on title
Commencé par : IntegrisDesign
in: Toolset Professional Support
Problem: The customer wants to create a primary sort based on a custom field and a secondary sort based on the title (alphabetical). Despite trying various changes, the primary sort seems to override the secondary sort. The customer is unsure if the issue is related to caching or another problem. Solution: I initially suggested using the wpv_filter_query to modify the orderby parameter in the theme's functions.php file. This involved adding the following code, replacing '1234' with the post view's ID and 'custom-field' with the custom field slug:
add_filter('wpv_filter_query', function($query, $setting, $view_id){
if(in_array($view_id, array(1234))){
$query['meta_key'] = 'wpcf-' . 'custom-field';
$query['orderby'] = array('title' => 'ASC', 'meta_value_num' => 'ASC');
}
return $query;
}, 101, 3);
The customer reported that the secondary sort was still not working. After further investigation and testing with a staging site, I identified that the issue was specific to the CPT Products. I provided a workaround that involved modifying the orderby filter to include secondary sorting by title. The following code was added to the theme's functions.php file:
<?php
function func_orderby_title($orderby) {
global $WP_Views;
if ($WP_Views->current_view == 14670) {
$orderby = $orderby . ", wp_posts.post_title ASC";
}
return $orderby;
}
add_filter('posts_orderby', 'func_orderby_title');
?>
I tested the solution on the staging site and then replicated it on the live site, confirming that the sorting issue was resolved. Relevant Documentation: |
|
2 | 15 | Il y a 1 year, 11 months | |
|
High CPU Usage
Commencé par : IntegrisDesign in: Toolset Professional Support |
|
2 | 4 | Il y a 2 years, 3 months | |
|
Limit Results In Checkboxes Custom Type – View
Commencé par : IntegrisDesign in: Toolset Professional Support |
|
2 | 2 | Il y a 2 years, 10 months | |
|
How do I update the subcategory design in WooCommerce?
Commencé par : IntegrisDesign in: Toolset Professional Support |
|
2 | 2 | Il y a 2 years, 11 months | |
|
Beaver Builder Toolset Forms Issue….
Commencé par : IntegrisDesign in: Toolset Professional Support |
|
2 | 2 | Il y a 3 years, 5 months | |
|
Calculating
Commencé par : IntegrisDesign in: Toolset Professional Support |
|
2 | 2 | Il y a 4 years, 5 months | |
|
Sorting Randomly
Commencé par : IntegrisDesign in: Toolset Professional Support |
|
2 | 4 | Il y a 4 years, 8 months | |
|
Parametric Search Page OR operator not AND
Commencé par : IntegrisDesign in: Toolset Professional Support |
|
2 | 6 | Il y a 4 years, 9 months | |
|
Sorting my repeating admin order
Commencé par : IntegrisDesign
in: Toolset Professional Support
Problem: I created a repeating view. I want the soft order on the website to be the same as the drag and drop order in the admin. Solution: You can try wpv_filter_query filter hook, like this: https://toolset.com/forums/topic/sorting-my-repeating-admin-order/#post-2101945 Relevant Documentation: |
|
2 | 3 | Il y a 4 years, 11 months |