|
add repeatable field group to existing form
Started by: winyS
in: Toolset Professional Support
|
|
2 |
4 |
3 years, 6 months ago
Christian Cox
|
|
Toolset relationship filter – only show results that have a relationship
Started by: matthewL-7
in: Toolset Professional Support
|
|
2 |
3 |
3 years, 6 months ago
matthewL-7
|
|
View not displaying on map
Started by: sarahM-9
in: Toolset Professional Support
Quick solution available
Problem: I would like to display a marker on a map View using the location from a related post
Solution: Use a shortcode in the View's loop to display a map marker using an address field in a related post.
|
|
2 |
9 |
3 years, 6 months ago
sarahM-9
|
|
Export custom post type data and related repeatable field group data
Started by: jorgel-4
in: Toolset Professional Support
Quick solution available
Problem: I would like to export information from a repeatable field group (RFG) into a CSV format.
Solution: A plugin like WP All Export can export RFG information if you add a bit of custom code in the export configurations.
Relevant Documentation: See the examples and screenshots below.
|
|
2 |
2 |
3 years, 6 months ago
Christian Cox
|
|
How to show all dates, inclusive post title plus some fields
Started by: fred-r.M
in: Toolset Professional Support
|
|
2 |
14 |
3 years, 6 months ago
Christian Cox
|
|
Difference between wp_toolset_associations and wp_toolset_associations_old
Started by: Graham
in: Toolset Professional Support
|
|
3 |
6 |
3 years, 6 months ago
Christian Cox
|
|
Filtering Posts for relationship connection in a submission form
Started by: igorL-3
in: Toolset Professional Support
Quick solution available
Problem: I would like to filter the parent post options in a Form that creates child posts. I would like to add custom code that filters the options based on their other post relationships.
Solution: Use the pre_get_posts filter to filter the parent post options in the parent post field. See the following example code:
/**
* Filter the Children parent field in the connect-toy-to-childmale Relationship Form
* to only show Children connected to Gender Male.
* https://toolset.com/forums/topic/filtering-posts-for-relationship-connection-in-a-submission-form/
*/
function filter_parent_posts( $query ){
$parent_post_type = "child"; // slug of parent post type
$child_post_type = "toy"; // slug of child post type
$rel_slug = "gender-child"; // slug of gender-child post relationship
$male_post_id = 9; // ID of Gender Male post
$rel_form_id = 26; // ID of the relationship form
// relationship form is on Toy single posts, queries parent_post_type posts
if ( ( defined('DOING_AJAX') && DOING_AJAX )
&& isset($query->query['post_type'][0])
&& $query->query['post_type'][0] == $parent_post_type
&& isset($_REQUEST['action'])
&& $_REQUEST['action'] == 'cred_association_form_ajax_role_find'
&& isset($_REQUEST['form_id'])
&& $_REQUEST['form_id'] == $rel_form_id
) {
// querying by gender post, which is parent in gender-child
$males = toolset_get_related_posts( $male_post_id, $rel_slug, array(
'query_by_role' => 'parent',
'limit' => 1000,
'offset' => 0,
'args' => array(),
'return' => 'post_id',
'role_to_return' => 'child'
));
$query->set( 'post__in', $males );
}
}
add_action( 'pre_get_posts', 'filter_parent_posts', 101, 1 );
Relevant Documentation:
https://toolset.com/forums/topic/how-to-show-in-cred-parent-selector-only-posts-of-logged-in-user/page/2/#post-605405
https://toolset.com/forums/topic/filter-post-relationship-dropdown-by-taxonomy/#post-1220408
https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/#toolset_get_related_posts
|
|
2 |
12 |
3 years, 6 months ago
igorL-3
|
|
Imported Related Posts from CSV, but they aren't connecting to exiting posts
Started by: Maggs
in: Toolset Professional Support
|
|
2 |
5 |
3 years, 6 months ago
Minesh
|
|
Export data to another website
Started by: Antoine
in: Toolset Professional Support
|
|
2 |
4 |
3 years, 7 months ago
Antoine
|
|
Editing Forms for old posts with many-to-many relationships
Started by: igorL-3
in: Toolset Professional Support
Quick solution available
Problem: I would like to understand how to manage M2M relationships with Forms and Views.
Solution: Use Views and Relationship Forms to manage relationships between M2M posts. See the sandbox site details in the ticket for more information.
|
|
2 |
16 |
3 years, 7 months ago
igorL-3
|
|
Only display parent posts that have children with a custom field value
Started by: Rita
in: Toolset Professional Support
|
|
3 |
29 |
3 years, 7 months ago
Rita
|
|
Create search filter using a child taxonomy (category) to display parent results
Started by: anthonyD-3
in: Toolset Professional Support
Quick solution available
|
|
2 |
8 |
3 years, 7 months ago
anthonyD-3
|
|
Query only posts that have relationship items assigned in many to many relation
Started by: Shreyas Khatri
in: Toolset Professional Support
|
|
2 |
4 |
3 years, 7 months ago
Jamal
|
|
Views for relationships not showing after Toolset update
Started by: duongN-3
in: Toolset Professional Support
|
|
2 |
10 |
3 years, 7 months ago
Jamal
|
|
Update Php with new API. Help me!!!
Started by: vitoC
in: Toolset Professional Support
|
|
2 |
2 |
3 years, 7 months ago
Jamal
|