IntegrisDesign
Admite hilos creados en los últimos 30 días: 0
Debates favoritos del foro
Este usuario no tiene debates favoritos.
Temas del foro creados
| Status | Debate | Supporter | Voces | Mensajes | Caducidad |
|---|---|---|---|---|---|
|
Content Template Broke After Adding Gallery & Repeating Field
Iniciado por: IntegrisDesign en: Toolset Professional Support |
|
2 | 6 | 1 year, 8 months ago | |
|
I need to have images popup in a lightbox
Iniciado por: IntegrisDesign en: Toolset Professional Support |
|
3 | 5 | 1 year, 9 months ago | |
|
Secondary sort not working based on title
Iniciado por: IntegrisDesign
en: 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 | 1 year, 11 months ago | |
|
High CPU Usage
Iniciado por: IntegrisDesign en: Toolset Professional Support |
|
2 | 4 | 2 years, 3 months ago | |
|
Limit Results In Checkboxes Custom Type – View
Iniciado por: IntegrisDesign en: Toolset Professional Support |
|
2 | 2 | 2 years, 10 months ago | |
|
How do I update the subcategory design in WooCommerce?
Iniciado por: IntegrisDesign en: Toolset Professional Support |
|
2 | 2 | 2 years, 11 months ago | |
|
Beaver Builder Toolset Forms Issue….
Iniciado por: IntegrisDesign en: Toolset Professional Support |
|
2 | 2 | 3 years, 5 months ago | |
|
Calculating
Iniciado por: IntegrisDesign en: Toolset Professional Support |
|
2 | 2 | 4 years, 5 months ago | |
|
Sorting Randomly
Iniciado por: IntegrisDesign en: Toolset Professional Support |
|
2 | 4 | 4 years, 8 months ago | |
|
Parametric Search Page OR operator not AND
Iniciado por: IntegrisDesign en: Toolset Professional Support |
|
2 | 6 | 4 years, 9 months ago | |
|
Sorting my repeating admin order
Iniciado por: IntegrisDesign
en: 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 | 4 years, 11 months ago |