tablo_24 69 ارسال شده در خرداد 97 گزارش بازنشر ارسال شده در خرداد 97 سلام من یه مشکل با این کد دارم که فیلد نیم هر وقت فارسی مینویسم دیتا هایی که دو تا فیلد مینویسم یکی میشه الان متنی که برای سند و طبقه مینویسم یکی میشه و تو خروجی متن یکی رو تکرار میکنه امکان نوشتن field name انگلیسی هم برام نیست چون دقیقا همین متن field name زو تو قالب لود میکنه نمی خوام انگلیسی باشه /** * Add property custom meta fields */ function add_property_custom_fields( $new_fields ) { $new_fields['tab'] = array( 'label' => 'Custom Tab', // tab name 'icon' => 'dashicons-admin-generic' // tab icon class (of dashicon). See all dashicons here: https://developer.wordpress.org/resource/dashicons ); $new_fields['fields'] = array( array( 'name' => 'سند', // field name 'desc' => 'Example Value: 12-06-2016', // field description 'postfix' => '', // field postfix (if any) 'icon' => 'year', // Place “png” icon in "realhomes/assets/(variation you are using)/icons" directory. Retina (double sized) icons should use @2x as postfix with icon name. E.g: year.png, year@2x.png 'columns' => 6, // use ‘6’ for two fields in one row and ’12’ for one field in one row 'display' => true // true to display field value on property detail page, otherwise false ), array( 'name' => 'طبقه', // field name 'desc' => 'Example Value: 300', // field description 'postfix' => '', // field postfix (if any) 'icon' => 'size', // Place “png” icon in "realhomes/assets/(variation you are using)/icons" directory. Retina (double sized) icons should use @2x as postfix with icon name. E.g: year.png, year@2x.png 'columns' => 6, // use ‘6’ for two fields in one row and ’12’ for one field in one row 'display' => true // true to display field value on property detail page, otherwise false ), return $new_fields; } add_filter( 'inspiry_property_custom_fields', 'add_property_custom_fields' ); نقل قول لینک به ارسال
پست های پیشنهاد شده
به گفتگو بپیوندید
هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .