avansisI-2
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 |
---|---|---|---|---|---|
View with relationship
1
2
3
Started by: avansisI-2 in: Toolset Professional Support |
3 | 38 | 3 years, 11 months ago | ||
Cannot change author to custom user in custom type post.
Started by: avansisI-2 in: Toolset Professional Support |
2 | 3 | 3 years, 11 months ago | ||
Create Message System with Message Module
Started by: avansisI-2 in: Soporte profesional de Toolset |
2 | 8 | 3 years, 12 months ago | ||
Information in USER API with field custom
1
2
Started by: avansisI-2 in: Toolset Professional Support |
2 | 16 | 3 years, 12 months ago | ||
phone field unique in the user registration
Started by: avansisI-2 in: Toolset Professional Support |
2 | 9 | 3 years, 12 months ago | ||
View only show child custom type
Started by: avansisI-2 in: Toolset Professional Support |
2 | 2 | 4 years ago | ||
Problems with template content
Started by: avansisI-2 in: Toolset Professional Support |
1 | 2 | 4 years ago | ||
activate an action when loading a page with form, without submit
Started by: avansisI-2 in: Toolset Professional Support |
2 | 8 | 4 years ago | ||
expose related posts in REST API
Started by: avansisI-2
in: Toolset Professional Support
Problem: Solution: I used the following and slugs:
function get_parent_page_for_api_bonos( $object ) { //get the id of the post object array $post_id = $object['id']; //return the post meta return toolset_get_related_post( $post_id, 'parent-cpt-child-cpt'); } add_action( 'rest_api_init', 'create_api_posts_meta_field_bonos'); function create_api_posts_meta_field_bonos() { register_rest_field( 'child-cpt', 'parent_page', array( 'get_callback' => 'get_parent_page_for_api_bonos', 'schema' => null, ) ); } Relevant Documentation: |
2 | 7 | 4 years ago | ||
I am having problems with the relationship in the API
Started by: avansisI-2
in: Toolset Professional Support
Problem: I am having problems with the relationship in the API, how to get related parent post in PHP codes. Solution: I suggest you follow our document to setup the PHP codes. |
2 | 6 | 4 years ago | ||
Generate a random number and letters in custom field
Started by: avansisI-2
in: Toolset Professional Support
Problem: Use cred_save_data action hook to update a custom field value. Solution: You can try these: 1) Create a post form for editing post, so you will can setup submit button in the form 2) Create another custom codes, use update_post_meta() to update the custom field value, for example: https://toolset.com/forums/topic/generate-a-random-number-and-letters-in-custom-field/#post-1856061 Relevant Documentation: https://developer.wordpress.org/reference/functions/wp_update_post/ https://developer.wordpress.org/reference/functions/wp_update_post/#user-contributed-notes |
2 | 8 | 4 years ago | ||
link to whatsapp app with custom field
Started by: avansisI-2 in: Soporte profesional de Toolset |
2 | 3 | 4 years ago | ||
Create different relationshop with same custom type
Started by: avansisI-2 in: Soporte profesional de Toolset |
2 | 2 | 4 years ago | ||
CC on messages sended with Messages Module
Started by: avansisI-2
in: Soporte profesional de Toolset
Problem: I need to send a copy of the messages sent with Messages Module, copied to a specific user. Solution: There are two post forms within Messages Module: - New message - Reply message you can find and edit them here: Dashboard-> Toolset-> Post Forms Then follow our document to add the messages notification recipients: Relevant Documentation: https://toolset.com/course-lesson/send-notifications-when-someone-submits-the-form/ |
2 | 7 | 4 years ago | ||
Status expired when 2 days have passed from the date of creation
1
2
Started by: avansisI-2
in: Toolset Professional Support
Problem: After two days have passed from the time of post creation, I would like to display some text on my post that says the post has expired. Solution: Use two separate custom date fields to store the post creation timestamp and the post expiration timestamp. Use a custom function or custom shortcode to compare the expiration timestamp with the current timestamp. The following code example shows how to set the two requested custom field values: //FECHA AUTOMÁTICA BONOS add_action( 'save_post', 'tssupp_auto_set_date_fields', 100, 3 ); function tssupp_auto_set_date_fields( $bonos, $post, $update ) { $post_type = 'bonos'; $created_field_slug = 'fecha-de-creacion-del-bono'; // edit your created field slug here $expiration_field_slug = 'fecha-de-caducidad'; // edit your expiration field slug here // do not edit below this line $created_field_value = get_post_meta($bonos, 'wpcf-' . $created_field_slug, true); $expiration_field_value = get_post_meta($bonos, 'wpcf-' . $expiration_field_slug, true); if ( $post->post_status == 'publish' && $post->post_type == $post_type && !$created_field_value ) { update_post_meta( $bonos, 'wpcf-' . $created_field_slug, date('U') ); } if ( $post->post_status == 'publish' && $post->post_type == $post_type && !$expiration_field_value ) { update_post_meta( $bonos, 'wpcf-' . $expiration_field_slug, (date('U') + 172800) ); } } |
2 | 19 | 4 years ago |