Problem: When a post is created with Forms, the appropriate Divi template isn't applied correctly and the sidebar appears under the post.
Solution: Use a custom code snippet to apply the appropriate Divi template:
add_action('cred_save_data', 'save_sidebar_layout_action',10,2); function save_sidebar_layout_action($post_id, $form_data) { // if a specific form if ($form_data['id']==1243) { // add it to saved post meta update_post_meta($post_id, '_et_pb_page_layout', 'et_right_sidebar'); } }
Relevant Documentation:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - | - |
13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - | - |
Supporter timezone: America/New_York (GMT-04:00)
Ce sujet contient 4 réponses, a 2 voix.
Dernière mise à jour par Il y a 5 années et 2 mois.
Assisté par: Christian Cox.