John Johansen
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 |
---|---|---|---|---|---|
Custom CSS in a View content template not working
1
2
Started by: John Johansen in: Toolset Professional Support |
2 | 19 | 5 years, 11 months ago | ||
Find ‘child’ posts that are NOT in a M2M relationship with a ‘parent’ post
Started by: John Johansen
in: Toolset Professional Support
Problem: Within a many-to-many relationship between to Custom Post Types, for a given 'parent' post, I need to see a list of 'child' posts which are NOT already part of a relationship with that particular 'parent' post. Solution: You can setup custom codes with filter hook "wpv_filter_query" to apply custom filters to your view, for example: Relevant Documentation: https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query |
2 | 3 | 5 years, 11 months ago | ||
Check if relationship exists between two particular posts
Started by: John Johansen
in: Toolset Professional Support
Problem: I want to check if a relationship exists between a given parent post and a given child post. Solution: It is possible within Views plugin, for example, you can create a post view, see details here: Relevant Documentation: |
2 | 3 | 5 years, 11 months ago | ||
Using filters to determine which Template Layout or Content Filter is used
Started by: John Johansen
in: Toolset Professional Support
Problem: Solution: The wpv_filter_force_template filter is a Views filter. You can use the get_layout_id_for_render filter to modify which Template Layout is used, or the wpv_filter_force_template filter to modify which Content Template is used, but you cannot use the filters to modify whether a Template Layout or Content Template is used, which will be determined by what you have set for the post type, or more specifically for the individual post. Relevant Documentation: |
2 | 3 | 6 years, 10 months ago | ||
Single CRED form – multiple submit buttons/actions
Started by: John Johansen in: Toolset Professional Support |
2 | 7 | 6 years, 11 months ago | ||
Need to execute some dynamic SQL as part of a CRED form submission
Started by: John Johansen
in: Toolset Professional Support
Problem: I need to execute some dynamic SQL in a CRED hook callback function. What is the best practice for querying the database? Solution: Use the WordPress global $wpdb and follow WordPress best practices. Relevant Documentation: https://codex.wordpress.org/Class_Reference/wpdb |
2 | 3 | 6 years, 12 months ago | ||
Display a CPT with different layouts based on conditions
Started by: John Johansen in: Toolset Professional Support |
2 | 4 | 7 years ago | ||
Create Child Post Link – won't recognize page containing form to add child post
Started by: John Johansen in: Toolset Professional Support |
2 | 5 | 7 years, 1 month ago | ||
CRED front-end forms – how to set context for post-to-post relationships
Started by: John Johansen
in: Toolset Professional Support
Problem: In a CRED form that creates child posts, I would like to filter the options shown in a generic field based on other posts in its hierarchy. Solution: If you know the grandparent ID in the context of the CRED form you can then pass that value into a View's filter using a shortcode attribute. That View can have a post relationship filter, where the parent is set by a shortcode attribute. The output of that View can be used to define the options for your generic select field. You can access URL parameters with this shortcode: add_shortcode( 'wpv-post-param', 'wpv_post_param_shortcode' ); function wpv_post_param_shortcode( $atts ) { if ( !empty( $atts['var'] ) ) { $var = (array)$_GET[$atts['var']]; return esc_html( implode( ', ', $var ) ); } } For example, if your type D CRED form is accessed at a URL like yoursite.com/new-post-type-d?a=12345, then you can access the type a ID (12345) like so: [wpv-post-param var='a'] You can then pass that URL parameter into a View as a shortcode attribute: [wpv-view name="some-view" wpvb="[wpv-post-param var='a']"] With that approach, you can filter "some-view" using the post type A id from the URL parameter. Relevant Documentation: |
2 | 5 | 7 years, 1 month ago | ||
Types – custom post type – slug length limited to 20 characters
Started by: John Johansen
in: Toolset Professional Support
Problem: I would like to remove the 20 character limit on custom post type slugs. Solution: This 20 character limit is imposed by WordPress and Toolset does not provide the capability to override that limit. Types registers custom post types using the standard WordPress function "register_post_type". Please see the register_post_type documentation link below. If you just want to have longer slugs in the URLs for your CPT, you can use the Rewrite option in the post type editor to specify a different slug. The 20-character limit does not apply to the rewrite. I'm attaching a screenshot that shows where this option can be modified. This would result in posts with URLs like http://yoursite.com/this-is-a-long-slug-that-can-replace-your-short-cpt-slug/post-slug Relevant Documentation: https://codex.wordpress.org/Function_Reference/register_post_type |
2 | 3 | 7 years, 1 month ago | ||
Setting default HTML/CSS by field for Layouts/Views front-end output
Started by: John Johansen in: Toolset Professional Support |
2 | 7 | 7 years, 1 month ago | ||
Why use repeating fields/groups versus parent/child post relationships?
Started by: John Johansen in: Types Community Support |
2 | 6 | 7 years, 1 month ago | ||
Basic accordion implementation in Views (without shortcode)
Started by: John Johansen
in: Toolset Professional Support
Problem: |
3 | 5 | 7 years, 1 month ago |