ورود

توجه ! این یک نسخه آرشیو شده میباشد و در این حالت شما عکسی را مشاهده نمیکنید برای مشاهده کامل متن و عکسها بر روی لینک مقابل کلیک کنید : اضافه نشدن متا باکس در وردپس



p30nama
August 3rd, 2017, 23:33
سلام

قالب سایتم یک پست سفارشی (post type ) برای فیلم داره و میخوام اکس دانلود اضافه کنم

در قسمت پست های معمولی (نوشته ها) با اضافه کردم کد زیر در funcation قالب ، بهر احتی اضافه میشه



$plugins = array(
// This is an Node of how to include a plugin bundled with a theme.
array(
'name' => 'Advanced Custom Fields Pro', // The plugin name.
'slug' => 'advanced-custom-fields-pro', // The plugin slug (typically the folder name).
'source' => get_stylesheet_directory() . '/plugins/advanced-custom-fields-pro.zip', // The plugin source.
'required' => true, // If false, the plugin is only 'readvanced-custom-fiecommended' instead of required.
'version' => '', // E.g. 1.0.0. If set, the active plugin must be this version or higher. If the plugin version is higher than the plugin version installed, the user will be notified to update the plugin.
'force_activation' => true, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch.
'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins.
'external_url' => '', // If set, overrides default API URL and points to an external URL.
'is_callable' => '', // If set, this callable will be be checked for availability to determine if a plugin is active.
),
);






اما برای پست سفارشی فیلم که یک پلاگین داره ، هرکار میکنم اضافه نمیشه
توی funcation پلاگین هم گذاشتم نشد

کد زیر متاباکس شبکه اجتماعی را در پست سفارشی ادد میکنه



// Social Profile Settings
$meta_boxes[] = array(
'id' => 'social-post-meta',
'title' => __( 'Social Profile Settings', 'themeum-core' ),
'pages' => array( 'movie'),
'context' => 'normal',
'priority' => 'high',
'autosave' => true,
'fields' => array(

array(
'name' => __( 'Facebook URL', 'themeum-core' ),
'id' => "{$prefix}movie_facebook_url",
'type' => 'url',
'std' => ''
),
array(
'name' => __( 'Twitter URL', 'themeum-core' ),
'id' => "{$prefix}movie_twitter_url",
'type' => 'url',
'std' => ''
),
array(
'name' => __( 'Vimeo URL', 'themeum-core' ),
'id' => "{$prefix}movie_vimeo_url",
'type' => 'url',
'std' => ''
),
array(
'name' => __( 'Google Plus URL', 'themeum-core' ),
'id' => "{$prefix}movie_google_plus_url",
'type' => 'url',
'std' => ''
),
array(
'name' => __( 'Youtube URL', 'themeum-core' ),
'id' => "{$prefix}movie_youtube_url",
'type' => 'url',
'std' => ''
),
array(
'name' => __( 'Instagram URL', 'themeum-core' ),
'id' => "{$prefix}movie_instagram_url",
'type' => 'url',
'std' => ''
),
array(
'name' => __( 'Website URL', 'themeum-core' ),
'id' => "{$prefix}movie_website_url",
'type' => 'url',
'std' => ''
),
)
);



کسی میتونه واسم درستش کنه؟ یا راهنمایی کنه؟

p30nama
August 5th, 2017, 14:17
کسی نیست راهنمایم کنه؟