Quelle est la question ?

Texte de la réponse

Titre de la section accordéon

Contenu de l’accordéon

Section accordéon #2

Contenu de l’accordéon #2
string(80) "https://gittheme.fastewebdev.com/wp-content/plugins/faste-ai-generated-sections/"

asdads 23

  • When editing a post (GET request), $_GET['post'] exists → $post_id is set.

  • When saving a post (POST request), $_POST['post_ID'] exists → $post_id is set.

This way, the correct fields.php will be included before ACF processes the meta save, and values will persist.

Why This Fix Works

Ah ✅ that makes sense: when saving an existing post, the request does not have $_GET['post'] because WordPress sends a POST request to post.php with action=editpost.

So inside gsia_load_section_fields(), your $post_id detection fails (it always returns 0), which means no fields.php gets included → ACF doesn’t know the fields → values