gabrielB
Support threads created in the last 30 days: 4
Favorite Forum Topics
This user has no favorite topics.
Forum Topics Created
Status | Topic | Supporter | Voices | Posts | Freshness |
---|---|---|---|---|---|
Post Relationship Order not working
Started by: gabrielB
in: Toolset Professional Support
Problem: I want a Custom Post Type Relationship (Lecturer) to load in a particular order: alphabetically ascending by custom field value (lecturer-surname): https://toolset.com/forums/topic/post-relationship-order-not-working/#post-1215442 Solution: You can try the WP_Query, like this: https://toolset.com/forums/topic/post-relationship-order-not-working/#post-1216755 Relevant Documentation: |
2 | 4 | 5 years, 8 months ago | ||
Post Relationship not loading properly in an archive.
Started by: gabrielB
in: Toolset Professional Support
Problem: Solution: In a one-to-many relationship the one is the 'parent' and the many are the 'children'. In a many-to-many relationship that same convention doesn't really make sense, but is used anyway. So the post type on the left is the 'parent' and the post type on the right is the 'child', even though they are more like siblings. You need to specify the 'parent' and 'child' correctly in the function arguments. Here is a generic example to retrieve related posts, using the parent-child convention even for a M2M relationship: $children = toolset_get_related_posts( $parent_id, $relationship_slug, array( 'query_by_role' => 'parent', 'limit' => 999, 'return' => 'post_id', 'role_to_return' => 'child' ) ); Relevant Documentation: |
2 | 9 | 5 years, 10 months ago | ||
Custom URL Rewrite stops pagination from working in Template pages
Started by: gabrielB in: Toolset Professional Support |
2 | 4 | 5 years, 10 months ago | ||
Custom query for posts that have custom field checkbox value of 1
Started by: gabrielB
in: Toolset Professional Support
Problem: I would like to write a custom PHP query to find Client posts with a custom checkbox checked. Solution: $args = array( 'post_type' => 'client', 'meta_key' => 'wpcf-checkbox', 'meta_value' => '1', 'orderby' => 'rand', 'posts_per_page' => 8, ); $query = new WP_Query( $args ); Relevant Documentation: |
2 | 3 | 6 years, 1 month ago | ||
I want to add a class to a WYSIWYG custom field
Started by: gabrielB
in: Toolset Professional Support
Problem: Solution: |
2 | 5 | 6 years, 1 month ago | ||
Split: Coding Post Relationship (Parent of Child) – related CPT (Learning Partners)
Started by: gabrielB in: Toolset Professional Support |
2 | 7 | 6 years, 1 month ago | ||
Coding Post Relationship (Parent of Child)
1
2
Started by: gabrielB in: Toolset Professional Support |
3 | 31 | 6 years, 1 month ago | ||
Split: Coding Post Relationship (Parent of Child) – show related content
Started by: gabrielB in: Toolset Professional Support |
2 | 7 | 6 years, 1 month ago | ||
Users are being logged out when trying to access restricted content
Started by: gabrielB in: Toolset Professional Support |
2 | 2 | 6 years, 3 months ago | ||
Displaying a CPT loop but restricting the CPT single page to logged in users
Started by: gabrielB
in: Toolset Professional Support
Problem: The issue here is that the user wanted to restrict some of their pages to users who are not logged in. Solution: Take a look at the link below for more information on how Post Groups work in our Access plugin. |
2 | 2 | 6 years, 4 months ago |