justinB-5
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 |
---|---|---|---|---|---|
Toolset Packager – Doesn't Export CPT's or Layouts
Started by: justinB-5 in: Toolset Professional Support |
2 | 5 | 7 years, 9 months ago | ||
Append Title to another Post submitted through cred
Started by: justinB-5 in: Toolset Professional Support |
2 | 6 | 7 years, 9 months ago | ||
Amazon S3 File Upload
1
2
Started by: justinB-5
in: Toolset Professional Support
Problem: Solution: |
4 | 24 | 8 years, 1 month ago | ||
conditional user has post with parent current page
Started by: justinB-5
in: Toolset Professional Support
Problem: Solution: 2. Display the Link to that CRED somewhere on your site 3. Create a Custom PHP function to evaluate the amount of Posts created by the currently logged in user. /** *Count posts of given type, so each user can create post only once */ function u_post_count() { $user_post_count = count( get_posts( array( 'post_type' => 'your_post_type_slug', 'author' => get_current_user_id(), //this will count the posts of the current logged in user ) ) ); return $user_post_count;//this returns a numerical value of Posts created by that user } 4. Register this function in Views > Settings > Compatibility > 3rd Party Functions 5. Use it in a wpv-conditional as elaborated here: 6. Wrap the CRED Form / link with above conditional Optional: So your code can look like this: /** *Count posts of given type, so each user can create post only once */ function u_post_count() { $post_id = $post->ID; //get current post ID $user_post_count = count( get_posts( array( 'post_type' => 'your_post_type_slug', //child post type 'meta_key' => '_wpcf_belongs_your-parent-post-type-slug_id', 'meta_value' => $post_id, 'author' => get_current_user_id(), //this will count the posts of the current logged in user ) ) ); return $user_post_count;//this returns a numerical value of Posts created by that user } Relevant Documentation: |
2 | 8 | 8 years, 2 months ago | ||
yes/no survey
Started by: justinB-5
in: Toolset Professional Support
Problem: [cred_generic_field field="_wpcf_belongs_property_id" type="hidden" class="" urlparam=""] { "required":0, "validate_format":0, "persist":1, "default":[wpv-post-id id="$current_page"] } [/cred_generic_field] Relevant Documentation: |
2 | 4 | 8 years, 3 months ago |