رفتن به مطلب

پست های پیشنهاد شده

سلام

 

من یه مشکل با این کد دارم که فیلد نیم هر وقت فارسی مینویسم دیتا هایی که دو تا فیلد مینویسم یکی میشه 

الان متنی که برای سند و طبقه مینویسم یکی میشه و تو خروجی متن یکی رو تکرار میکنه

امکان نوشتن 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' );

 

لینک به ارسال

به گفتگو بپیوندید

هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .

مهمان
ارسال پاسخ به این موضوع ...

×   شما در حال چسباندن محتوایی با قالب بندی هستید.   حذف قالب بندی

  تنها استفاده از 75 اموجی مجاز می باشد.

×   لینک شما به صورت اتوماتیک جای گذاری شد.   نمایش به صورت لینک

×   محتوای قبلی شما بازگردانی شد.   پاک کردن محتوای ویرایشگر

×   شما مستقیما نمی توانید تصویر خود را قرار دهید. یا آن را اینجا بارگذاری کنید یا از یک URL قرار دهید.

×
×
  • اضافه کردن...