garyF-3
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 |
---|---|---|---|---|---|
can't find plugin Toolset CRED WPML Integration in downloads
Started by: garyF-3 in: Toolset Professional Support |
2 | 2 | 6 years, 11 months ago | ||
pre-populating zip codes and countries, cities
Started by: garyF-3 in: Toolset Professional Support |
2 | 4 | 6 years, 11 months ago | ||
Limit front end view of post type to author of post
Started by: garyF-3 in: Toolset Professional Support |
2 | 2 | 7 years, 1 month ago | ||
Showing the number of posts by user within a view
Started by: garyF-3 in: Toolset Professional Support |
2 | 4 | 7 years, 1 month ago | ||
I want to only display the parent items of the current user in a select box
Started by: garyF-3
in: Toolset Professional Support
Problem: Solution: 2. In the Parent Selector Code of that form you should use only default available arguments, as this: <div class="cred-group cred-group-parents"> <div class="cred-field cred-field-_wpcf_belongs_page_id">//change "page" to your parent post slug <label class="cred-label"> Choose Parent </label> This is only for test display: [get-parents] [cred_field field='_wpcf_belongs_page_id' value='']//change "page" to your Parent Post Slug </div> </div> 3. In the JS: jQuery('document').ready(function(){ var post_parents = jQuery('#parents_id').val(); var arr = post_parents.split(','); jQuery("[name=_wpcf_belongs_page_id] > option").each(function() { //change "page" to your parent post slug var option_val = jQuery(this).val(); if( jQuery.inArray(option_val, arr) == -1 && option_val != -1 ){ jQuery(this).remove(); } }); }); 4. In functions.php: function get_parents($atts) { global $current_user; get_currentuserinfo(); $author_query = array('post_type' => 'page', 'posts_per_page' => '-1','author' => $current_user->ID,); $author_posts = new WP_Query($author_query); $parent_ids = ""; while($author_posts->have_posts()) : $author_posts->the_post(); $parent_ids .= get_the_ID() .","; endwhile; return $parent_ids; } add_shortcode('get-parents', 'get_parents'); 5. in Views > Compatibility > 3rd party ShortCodes register: get-parents 6. If you insert the CRED Form in a Post, it correctly displays only parent Posts of current author/user. |
2 | 3 | 7 years, 1 month ago | ||
Create flow for user from parent cred form to child form and linking them
1
2
Started by: garyF-3 in: Toolset Professional Support |
2 | 20 | 7 years, 2 months ago | ||
I need to only display a loop view based on taxonomies for the parent post
1
2
Started by: garyF-3
in: Toolset Professional Support
Problem: I have two Views of taxonomy terms, shown as tabs and tab panels, in a tab-based interface that allows users to select a term and show the associated term panel. This tab interface is displayed in a parent post type. In the tab panel of each term I include another View that shows all the child posts associated with that term. If no child posts are found, I do not want to show the tab or tab panel. Solution: There's not a good way to apply conditional logic to a parent View that tests the output of a child View. Instead, you must apply a taxonomy query filter with the following custom code. This code loops over all the child posts associated with the current parent post, and builds an array of all the associated terms. If a term is not associated with any child, it will not be added. Then apply this as the "include" option in your taxonomy query as shown here: add_filter( 'wpv_filter_taxonomy_query', 'prefix_only_assigned_tax_query', 10, 3 ); function prefix_only_assigned_tax_query( $tax_query_settings, $view_settings, $view_id ) { global $post; $views = [243391, 243393]; if( in_array( $view_id, $views) ) { // query all credit posts and build an array of used cred-type terms $ids = array(); $args = array( 'post_type' => 'credit', 'meta_query' => array( array( 'key' => '_wpcf_belongs_website_id', 'value' => $post->ID ) ) ); $ps = get_posts( $args ); foreach($ps as $post) { // loop over each post and push its terms into the array $terms = wp_get_post_terms( $post->ID, 'cred-type'); foreach($terms as $term) { if( !isset( $ids[$term->term_id] ) ) { $ids = array_merge($ids, array($term->term_id)); } } } $ids = count($ids) ? $ids : array(9999999); $tax_query_settings["include"] = $ids; } return $tax_query_settings; } Relevant Documentation: https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_taxonomy_query |
2 | 22 | 7 years, 2 months ago | ||
Creating a form that lists multiple child posts of a parent with a link
Started by: garyF-3
in: Toolset Professional Support
Problem: I would like to create a Page that lists all child posts created by the current User and includes a CRED edit link to edit each post. I would also like to be able to filter the list of child posts by parent post, so I can show only children of a specific parent. Solution: Create a View of child posts created by the current User. In the Loop Output, include a CRED Edit Form link for each post. Modify the View to include a Query Filter, filtered by post relationship. Set the filter to respond to a shortcode parameter. On each parent post's page, insert a link to the page with the View and apply the shortcode parameter with the current post's ID so that the filter knows to display only this parent's children. <a href="/edit-credits-page-slug/?parent-site=[wpv-post-id]">Edit Credits for [wpv-post-title]</a> Relevant Documentation: https://toolset.com/documentation/user-guides/passing-arguments-to-views/ |
2 | 14 | 7 years, 2 months ago | ||
timeline with repeating fields
Started by: garyF-3 in: Toolset Professional Support |
2 | 2 | 7 years, 3 months ago | ||
Creating a conditional view based on child CPT
Started by: garyF-3
in: Toolset Professional Support
Problem: Solution: |
2 | 6 | 7 years, 3 months ago | ||
Image Link Doesn’t Work From View
Started by: garyF-3
in: Toolset Professional Support
Problem: Solution: [wpv-for-each field="wpcf-image-field-slug"] <a href="[types field='image-field-slug' size='full' url='true'][/types]">[types field='image-field-slug' alt='%%ALT%%' title='%%TITLE%%' align='none' resize='proportional'][/types]</a> [/wpv-for-each] |
2 | 9 | 7 years, 3 months ago | ||
Layouts taken over single page
Started by: garyF-3 in: Toolset Professional Support |
2 | 13 | 7 years, 3 months ago | ||
Remove map and show/hide coordinates from address entry
Started by: garyF-3 in: Toolset Professional Support |
3 | 3 | 7 years, 3 months ago | ||
Repeat Sets of Fields for submission form
Started by: garyF-3 in: Toolset Professional Support |
2 | 8 | 7 years, 4 months ago | ||
User Fields With CPT custom fields
Started by: garyF-3 in: Toolset Professional Support |
2 | 5 | 7 years, 4 months ago |