Ricardo Almeida
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 |
---|---|---|---|---|---|
Some fields are not being focused by the cursor
Started by: Ricardo Almeida in: Toolset Professional Support |
1 | 2 | 6 years, 2 months ago | ||
I can not properly align the checkboxes
Started by: Ricardo Almeida
in: Toolset Professional Support
Problem: Solution: .wpt-form-item .wpt-form-checkbox { width: auto; margin-top: -4px; } |
2 | 4 | 6 years, 2 months ago | ||
Auto numbering in a post child
Started by: Ricardo Almeida
in: Toolset Professional Support
Problem: I would like to automatically number child posts using an incrementing index. Solution: Use the following custom code: add_action( 'toolset_association_created', 'toolset_number_child_posts', 10, 3 ); function toolset_number_child_posts( $relationship_slug, $parent_id, $child_id ) { // apply auto number to bilhete posts that are children of sorteio posts if( get_post_type($parent_id)=='sorteio' && get_post_type($child_id)=='bilhete' ) { // get 2 most recent sibling bilhete posts $bilhete_args = array( 'numberposts' => 2, 'post_type' => 'bilhete', 'orderby' => 'post_date', 'order' => 'DESC', 'toolset_relationships' => array( 'role' => 'child', 'related_to' => $parent_id, 'relationship' => 'sorteio_bilhete' ), ); $bilhetes_query = new WP_Query( $bilhete_args ); $bilhetes = $bilhetes_query->posts; // don't update existing auto-numbering $this_id = get_post_meta( $bilhetes[0]->ID, 'wpcf-bilhete-number', true); if ( $this_id ) { return; } $last_id = isset($bilhetes[1]) ? get_post_meta( $bilhetes[1]->ID, 'wpcf-bilhete-number', true) : 0; $last_id++; add_filter('wpcf_fields_postmeta_value_save' , function( $value, $type, $slug, $cf, $obj ) use ( $child_id, $last_id ) { if ( $obj->post->ID === $child_id && 'bilhete-number' === $slug ) { return $last_id; } return $value; }, 10, 5 ); } } |
2 | 16 | 6 years, 4 months ago | ||
Is there a limit to the number of entries?
Started by: Ricardo Almeida in: Toolset Professional Support |
2 | 3 | 6 years, 4 months ago | ||
About Flatsome Compatibility
Started by: Ricardo Almeida in: Types Community Support |
2 | 3 | 7 years ago | ||
How to display custom search form on the side of results in a WordPress Archive?
Started by: Ricardo Almeida in: Types Community Support |
2 | 2 | 7 years, 1 month ago |