Ido Angel
Admite hilos creados en los últimos 30 días: 0
Debates favoritos del foro
Este usuario no tiene debates favoritos.
Temas del foro creados
Status | Debate | Supporter | Voces | Mensajes | Caducidad |
---|---|---|---|---|---|
Same item in different taxonomy creates a bug
Iniciado por: Ido Angel en: Toolset Professional Support |
1 | 2 | hace 4 años, 11 meses | ||
arrange taxonomies in filter by post count
Iniciado por: Ido Angel en: Toolset Professional Support |
2 | 3 | hace 5 años | ||
php of a view with shortcode attribute
Iniciado por: Ido Angel en: Toolset Professional Support |
2 | 8 | hace 5 años | ||
date cred field acts strangely inside
Iniciado por: Ido Angel en: Toolset Professional Support |
2 | 4 | hace 5 años, 2 meses | ||
script with toolset shortcodes
Iniciado por: Ido Angel
en: Toolset Professional Support
Problem: How to avoid conversion of quotation marks into HTML entities, when used in a Views output. Solution: Suggested to either: 1. Include suppress_filters="true" attribute in the "wpv-post-body" shortcode [wpv-post-body view_template="slug-of-the-content-template" suppress_filters="true"] OR 2. Skip the use of "wpv-post-body" shortcode and include the loop item's content directly in "wpv-loop" tag: <wpv-loop> ..... </wpv-loop> Relevant Documentation: https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-body |
2 | 3 | hace 5 años, 2 meses | ||
allowing «save as draft»
Iniciado por: Ido Angel
en: Toolset Professional Support
Problem: The issue here is that the user wanted to add a status option to their frontend form so that the post can be saved as a draft or publish based on the user's choice. Solution: [cred_generic_field type='select' field='order_stat' class='order-stat'] { "required":0, "default":["draft"], "options":[{"value":"draft","label":"draft"},{"value":"publish","label":"publish"}] } [/cred_generic_field] The user will then select the status they want to submit the post as. From there we can use a Cred hook to hook into the save post and then set the status there. add_action('cred_submit_complete', 'my_success_action',10,2); function my_success_action($post_id, $form_data) { // if a specific form if ($form_data['id']==346) { if (isset($_POST['order_stat'])) { // add it to saved post meta $my_post = array( 'ID' => $post_id, 'post_status' => $_POST['order_stat'], ); wp_update_post($my_post); } } } Now you will replace the my_custom_field with the slug of the generic field that you made. Note it would be best if this was a select field where the value and the display name is also the same. |
2 | 11 | hace 5 años, 2 meses | ||
select box with users' custom fields
Iniciado por: Ido Angel en: Toolset Professional Support |
2 | 6 | hace 5 años, 2 meses | ||
view of cpt – but with one line per specific custom field
Iniciado por: Ido Angel en: Chat Support |
1 | 2 | hace 5 años, 3 meses | ||
When creating a new post with cred, select author
Iniciado por: Ido Angel en: Toolset Professional Support |
2 | 7 | hace 5 años, 3 meses | ||
show field only if a year HASN'T passed from a date within another field
Iniciado por: Ido Angel en: Toolset Professional Support |
2 | 4 | hace 5 años, 3 meses | ||
Cred form for repeatable group – only allow to add to current post
Iniciado por: Ido Angel
en: Toolset Professional Support
Problem: Solution: In this case, the client was including the forms to add repeatable field groups directly in the output of a View, in which case the parent post could be specified by using the wpv-post-id shortcode to provide the default value for the selector. Relevant Documentation: |
2 | 7 | hace 5 años, 3 meses | ||
hierarchy mix? relationship? not sure what to use and how..
1
2
Iniciado por: Ido Angel en: Toolset Professional Support |
2 | 20 | hace 5 años, 4 meses | ||
repeatable fields in post form
Iniciado por: Ido Angel en: Toolset Professional Support |
2 | 3 | hace 5 años, 4 meses | ||
populate a field with post_id
Iniciado por: Ido Angel
en: Toolset Professional Support
Problem: The main issue being described here is that the user wanted to update their custom field using php. Solution: To do this you will need to use the function in the link below. A practical example of this can be seen below. function save_post_func_2134( $post_id ) { $post_type = 'doctor-order'; if ( $post_type == get_post_type ( $post_id ) ) { $my_post = array( 'ID' => $post_id, 'order-id' => 'dts-' . $post_id, 'post_title' => 'dts-' . $post_id ); update_post_meta( $post_id, 'wpcf-order-id', 'dts-'.$post_id); remove_action('save_post', 'save_post_func_2134'); wp_update_post( $my_post ); } } add_action( 'save_post', 'save_post_func_2134' ); |
2 | 3 | hace 5 años, 4 meses | ||
filter according to 2 categories – one default and the other by shortcode
Iniciado por: Ido Angel en: Toolset Professional Support |
2 | 3 | hace 5 años, 5 meses |