Kristin
Support threads created in the last 30 days: 0
Favorite Forum Topics
This user has no favorite topics.
Forum Topics Created
Status | Topic | Supporter | Voices | Posts | Freshness |
---|---|---|---|---|---|
Is it possible to "orderby" relationship when using in a WP_Query?
Started by: Kristin in: Toolset Professional Support |
3 | 4 | 4 months, 3 weeks ago | ||
View returning all entries from wp_toolset_connected_elements
Started by: Kristin in: Toolset Professional Support |
2 | 2 | 7 months, 3 weeks ago | ||
Orphan data in wp_toolset_associations
Started by: Kristin in: Toolset Professional Support |
2 | 2 | 8 months ago | ||
connecting issue
Started by: Kristin in: Toolset Professional Support |
2 | 2 | 2 years ago | ||
Some pages went blank after updating Toolset Views
Started by: Kristin in: Toolset Professional Support |
3 | 8 | 2 years ago | ||
Legacy maps need api key
Started by: Kristin in: Toolset Professional Support |
2 | 4 | 5 years, 11 months ago | ||
old custom field value in dropdown
Started by: Kristin in: Toolset Professional Support |
2 | 3 | 6 years, 3 months ago | ||
ajax pagination ordered by custom field breaks on pages after the first page
Started by: Kristin in: Toolset Professional Support |
2 | 2 | 6 years, 4 months ago | ||
Customer taxonomy filter ordering is breaking other filters
Started by: Kristin
in: Toolset Professional Support
Problem: I would like to define a custom order for the taxonomy terms in a custom search filter. Solution: The options you have for taxonomy term order are somewhat limited, and do not correspond to the order you define in the display_values attribute. My recommendation is to use the following filter shortcode: [wpv-control-post-taxonomy taxonomy="military-action" type="select" default_label="Select Conflict Below" url_param="wpv-military-action" orderby="id"] Then add this custom filter to your child theme's functions.php file: function custom_taxonomy_filter_order( $terms, $taxonomies, $args, $term_query ){ global $required_orderby; // Specify taxonomy, current setting for orderby, and required order (slugs) here $taxonomy = "military-action"; $current_orderby = "id"; $required_orderby = array( "wwi","wwii","korean-war","vietnam-war","gulf-war","war-in-iraq","war-on-terror","unknown" ); if ( $taxonomies[0] == $taxonomy && $args['orderby'] == $current_orderby ){ usort( $terms, "custom_term_compare" ); }; return $terms; } add_filter( 'get_terms', 'custom_taxonomy_filter_order', 10, 4); /** * Customise sort function * */ function custom_term_compare( $a, $b ){ global $required_orderby; $a_key = array_search( $a->slug, $required_orderby ); $b_key = array_search( $b->slug, $required_orderby ); if ( $a_key == $b_key ) { return 0; } return ( $a_key < $b_key ) ? -1 : 1; } Relevant Documentation: |
2 | 5 | 6 years, 7 months ago | ||
Curious when the estimated launch of Types 2.3 will be
Started by: Kristin in: Types Community Support |
2 | 2 | 6 years, 7 months ago | ||
Parametric search custom ordering results
Started by: Kristin in: Toolset Professional Support |
2 | 6 | 6 years, 10 months ago | ||
Call to undefined function get_current_screen() in /classes/class.file.php
Started by: Kristin in: Toolset Professional Support |
3 | 8 | 7 years, 4 months ago |