Custom fields are blank

Support MB Custom Post Type Custom fields are blankResolved

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #44699
    JeremyJeremy
    Participant

    Hello,

    I noticed that all of my custom fields are blank in the WordPress admin dashboard. The data seems to be in the database because it's rendering on the front end. I saw a recommendation here to increase max_input_vars, so I had Flywheel increase it to 20,000 on my hosting account. This didn't solve my problem, so I hoped someone here could provide advice or next steps to figure this out.

    #44700
    JeremyJeremy
    Participant

    I figured it out. Somehow the option under Advance to Save Field Value got switched off on all of my custom fields. Turning it back on for each custom field brought back the data in the back-end.

    #45625
    Joel WilsonJoel Wilson
    Participant

    I am having a similar issue. My CPTs are saving as blank forms. They are individually Labeled, but without any of the data I submitted before the save, just my blank fields. I suspect it's an issue of not having anywhere assigned to save the data... but can't be sure. I've not been able to find a fix. Do you have any suggestions relative to your experience with this similar issue?

    #45835
    Enrico FranciEnrico Franci
    Participant

    I created a select field in Metabox CPT backend that has two values
    <div>
    'type' => 'select',
    'name' => esc_html__( 'Collection', 'online-generator' ),
    'id' => $prefix . 'collection',
    'options' => [
    'Roma Livres' => esc_html__( 'Roma Livres', 'online-generator' ),
    'Hors Collection' => esc_html__( 'Hors Collection', 'online-generator' ),
    ],
    </div>
    The I try to retreive the selected value in frontend post tempalte using this code:

    <div>
    <?php $collection = get_post_meta( $post->ID, $value, 'edgr_collection', true );?>
    <div class="isbn">Collection: <?php echo $collection ?>
    </div>
    </div>
    But the output is "Array" (all other fields type are printed correctly!)

    Example URL below:

    https://www.editionsdegrenelle.fr/livre/la-bonne-education/

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.