KenG8581
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 |
---|---|---|---|---|---|
Nested Types fields are causing unwanted output
Started by: KenG8581
in: Toolset Professional Support
Problem: I have a checkboxes group custom field and I would like to display a different field if one of the checkboxes is checked. I tried nesting one Types field shortcode inside another one, but it produces inaccurate results. Solution: [wpv-conditional if="(CONTAINS(ARRAY([types field='pdb-areas' output='raw'][/types]),'some-value'))"] <tr> <td width="321"><strong><em>Markedsføring:</em> [types field="company-name-short"][/types]'s Facebook side</strong></td> <td width="321">[types field="company-name-short"][/types] har oprettet en side på Facebook for markedsføring og for skabe et online fælleskab omkring [types field="company-name-short"][/types].</td> </tr> [/wpv-conditional] Relevant Documentation: |
2 | 5 | 5 years, 2 months ago | ||
Referring to custom post custom fields
Started by: KenG8581 in: Toolset Professional Support |
1 | 3 | 5 years, 8 months ago | ||
Getting a post relationship in PHP
Started by: KenG8581
in: Toolset Professional Support
Problem: I have some questions about the toolset_get_related_posts API. Solution: $item = $array[0]; - I've asked for some documentation updates here and our team will make the necessary improvements. Relevant Documentation: |
2 | 3 | 5 years, 8 months ago | ||
Can’t delete Custom Fields Groups
Started by: KenG8581
in: Toolset Professional Support
Problem: Solution: In this case it seems to be a case of Ghost entries. What I would recommend that you do is to disable the Types plugin and enable it again and see if the field groups that you were trying to delete are still there. |
2 | 15 | 5 years, 8 months ago | ||
View of children filtered by two or more parents
Started by: KenG8581
in: Toolset Professional Support
Problem: My custom post type is a child of two parent post types. I would like to filter my View of child posts by multiple parents, but the GUI only allows one post relationship filter. Solution: You can use the wpv_filter_query filter to extend the meta query produced by your View. Child posts are related to parent posts in the postmeta table using the key format "_wpcf_belongs" + parent post type slug + "_id". Example: add_filter( 'wpv_filter_query', 'multi_parent_filter', 10, 3 ); function multi_parent_filter ( $query, $view_settings, $view_id ) { $views = array( 1234, 5678 ); if( in_array($view_id, $views) ) { $args = array( 'relation' => 'AND', array( 'key' => '_wpcf_belongs_parent-type-slug-1_id', 'value' => 9876, 'compare' => '=', 'type' => 'numeric' ), array( 'key' => '_wpcf_belongs_parent-type-slug-2_id', 'value' => 5432, 'compare' => '=', 'type' => 'numeric' ) ); // add these arguments to your meta query $query['meta_query'] = isset($query['meta_query']) ? $query['meta_query'] : []; $query['meta_query'][] = $args; } return $query; } Relevant Documentation: |
3 | 6 | 6 years, 2 months ago | ||
Possible limit on content within
Started by: KenG8581
in: Toolset Professional Support
Problem: Conditionals are not behaving as expected. If I add or remove content inside the conditional tags, the behavior of the conditional is different. Solution: Add this line to your wp-config.php file: ini_set('pcre.jit', false); Relevant Documentation: |
2 | 10 | 6 years, 3 months ago | ||
Post relationship parent is populated with 0 (zero) when editing with CRED
Started by: KenG8581
in: Toolset Professional Support
Problem: When editing a child post with CRED, if I deselect the parent post and submit the form I can see that _wpcf_belongs_parentslug_id = 0 in the database. However, if I perform the same change in wp-admin, _wpcf_belongs_parentslug_id is completely deleted for this post. I have a conditional set up that tests whether or not the _wpcf_belongs_parentslug_id field exists, and it's failing because 0 is not the same as not exists. Solution: For now, it's probably best to work around this discrepancy because relationships are changing in the very near future. $clientprocess_id = get_post_meta( $quest_id, '_wpcf_belongs_clientprocess_id', true); if (isset($clientprocess_id) && $clientprocess_id > 0)... |
2 | 6 | 6 years, 8 months ago | ||
Populate dropdown with child objects, and when one selected list grandchildren
Started by: KenG8581
in: Toolset Professional Support
Problem: I would like to create a custom search View that I can place on the single post of my top-level hierarchical post type - the Grandparent post. In that search View I want to show a filter where the User can select any posts of the second-level post - the Parent post. The matching third-level posts - the Child posts, should appear beneath the search form. Solution: In order to accomplish a parametric search of hierarchical post types like this, you must use URL parameters to predefine any level of the hierarchical relationship. If you do not want to include these parameters in your site links, you could consider a custom approach that redirects Users from the clean URLs to the parameterized URLs. Relevant Documentation: https://toolset.com/documentation/user-guides/querying-and-displaying-child-posts/ |
2 | 5 | 6 years, 11 months ago |