Skip Navigation

[Gelöst] The full-width option from DIVI is not applied to posts that use a given Content Template, when created with CRED

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

Problem:
When posts are added using CRED forms, and you use a Content Template with DIVI Theme options for those posts, then the full-width setting is not respected.

Solution:
None for now.
This is a workaround:
https://toolset.com/forums/topic/custom-posts-created-with-front-end-form-are-ignoring-divi-layout/#post-582923

Relevant Documentation:
https://toolset.com/errata/the-full-width-option-from-divi-is-not-applied-to-posts-that-use-a-given-content-template-when-created-with-cred/

This support ticket is created vor 7 Jahren, 1 Monat. There's a good chance that you are reading advice that it now obsolete.

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.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Dieses Thema enthält 2 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von mirkoG vor 7 Jahren, 1 Monat.

Assistiert von: Beda.

Author
Artikel
#582789
01.png

I configured the content template for my custom post type to always apply the fullwidth layout in DIVI (picture 01). When I create a post from the dashboard, it correctly utilises the fullwidth layout. When creating a new post from the front-end with the form I created with CRED, a sidebar appears.

Example:

This was created from the dashboard: versteckter Link
This was created via the front-end form: versteckter Link

Did I miss anything?

#582923

I confirm this issue.

A temporary solution can be to apply a Custom CRED API action and update the "_et_pb_page_layout" field of the newly created post with the correct value on submit (et_full_width_page).

This is elaborated here:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data

An example code can be:

add_action('cred_save_data', 'my_save_data_action',10,2);
function my_save_data_action($post_id, $form_data)
{
    // if a specific form
    if ($form_data['id']==12)
    {
       
          // add it to saved post meta
          update_post_meta($post_id, '_et_pb_page_layout', 'et_full_width_page');
        
    }
}

This will update the Field on submit of the CRED form and ensure that the right Layout is applied.

I will escalate this problem and report back to you once we have a proper solution.

#582999

It worked thanks.