martijnH
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 |
---|---|---|---|---|---|
Use comma in numberfield in wp-admin
Iniciado por: martijnH en: Toolset Professional Support |
2 | 3 | hace 2 años, 5 meses | ||
W3C error on distance filter
Iniciado por: martijnH en: Toolset Professional Support |
2 | 5 | hace 2 años, 7 meses | ||
Follow-up accessibility problem with distance filter
Iniciado por: martijnH en: Toolset Professional Support |
2 | 3 | hace 2 años, 7 meses | ||
Accessibility problem with distance filter
Iniciado por: martijnH en: Toolset Professional Support |
2 | 3 | hace 2 años, 8 meses | ||
Multiple close buttons in Toolset Blocks slider Lightbox
Iniciado por: martijnH en: Toolset Professional Support |
2 | 2 | hace 3 años | ||
other ticket is closed
Iniciado por: martijnH en: Toolset Professional Support |
2 | 9 | hace 3 años, 2 meses | ||
Random and invalid and tags.
Iniciado por: martijnH en: Toolset Professional Support |
2 | 6 | hace 3 años, 3 meses | ||
Orders publicly visible
Iniciado por: martijnH en: Toolset Professional Support |
2 | 3 | hace 3 años, 5 meses | ||
Image field in repeating fields group not saving
Iniciado por: martijnH
en: Toolset Professional Support
Problem: Solution: |
2 | 3 | hace 4 años, 7 meses | ||
Conflict official Font Awesome plugin (4.0.0-rc20) and Toolset
Iniciado por: martijnH en: Toolset Professional Support |
3 | 6 | hace 4 años, 7 meses | ||
Custom search view showing expected results
Iniciado por: martijnH en: Toolset Professional Support |
2 | 3 | hace 5 años | ||
Error on saving a view "Synchronous XMLHttpRequest on the main thread…"
Iniciado por: martijnH en: Toolset Professional Support |
1 | 2 | hace 5 años, 3 meses | ||
Custom predefined image size not used
Iniciado por: martijnH en: Chat Support |
1 | 2 | hace 5 años, 4 meses | ||
Theme options not shown in content template
Iniciado por: martijnH en: Toolset Professional Support |
2 | 6 | hace 5 años, 10 meses | ||
View with child post type: hide posts where parent is private/concept (part 3)
Iniciado por: martijnH
en: Toolset Professional Support
Problem: I have a post relationship between two post types. I want to show a View of child posts where the parent post is not private. Solution: Use custom code to test each child post's parent. Private parent posts will not be returned for any guest Users. Also test the post status, so logged-in Users will not see child posts of their own private parent posts. add_filter('wpv_filter_query', 'ts_parent_not_private_func', 10, 3); function ts_parent_not_private_func($query, $view_settings, $view_id) { $views = array( 16813, 16403 ); // only filter these views if( in_array( $view_id, $views ) ) { $child_ids = array(); // we will push IDs here if the parent is not found, or private $children_args = array( 'post_type' => 'training-datum', 'posts_per_page' => '-1', 'post_status' => 'publish', // you may want to add more filters here to improve the performance of this query ); $children = new WP_Query($children_args); foreach( $children->posts as $child ){ $parent = toolset_get_related_post( $child, 'training_training-datum', 'parent' ); // if there is no parent or the parent is private, push this ID into the exclusion array if( !$parent || get_post_status($parent) == 'private' ){ array_push( $child_ids, $child->ID ); } } $query['post__not_in'] = isset( $query['post__not_in'] ) ? $query['post__not_in'] : array(); $query['post__not_in'] = array_merge($query['post__not_in'], $child_ids ); } return $query; } Relevant Documentation: |
2 | 7 | hace 6 años, 2 meses |