Explode custom fields on item-post.php

Please tell me how to change the position of the custom field in the item-post.php file
There is a solution here, but it does not work in the item-post.php file
https://web.archive.org/web/20160613225938/http://forums.osclass.org/bender/explode-custom-fields-on-item-php

What did you tried? Please share your code and your use case.

explode custom fields on item.php
Here is a solution from Teseo that works on the item.php page.

      <?php $custom_fields = array();

        if( osc_count_item_meta() >= 1 ) { 

                while ( osc_has_item_meta() ) { 
                    if(osc_item_meta_value()!='') {

                  $custom_fields[osc_item_meta_name()] = osc_item_meta_value();
                 // Residue: echo osc_item_meta_name(); echo osc_item_meta_value();

                    }
                }
           } ?>

    <div><strong>Custom_field1: </strong><?php echo $custom_fields['custom1'] ;?></div>

Here is a solution from Silent Reader

   <?php $custom_field = array();
        if( osc_count_item_meta() >= 1 ) { 
                while ( osc_has_item_meta() ) { 
                    if(osc_item_meta_value() !="") {
        $custom_field_name[osc_item_meta_slug()] = osc_item_meta_name();
        $custom_field_value[osc_item_meta_slug()] = osc_item_meta_value();
                    }
                }
    } ?
<p class="left"><?php echo $custom_field_name['user-address-private'] ;?>: <strong><?php echo $custom_field_value['user-address-private'] ;?></strong></p>

I need to implement the same thing on the item-post.php page
This code displays custom fields on the page:

            <?php if($edit) {
                ItemForm::plugin_edit_item();
            } else {
                ItemForm::plugin_post_item();
            } ?>

And I do not know what can be done with it :frowning:

Summary

This text will be hidden

`

This warning appears when editing an ad
Notice: Array to string conversion in /oc-includes/osclass/classes/database/DBCommandClass.php on line 308