TonyWitham on "custom metabox type file only shows some images from Media Library"

خرید بک لینک

TonyWitham
Member
Posted 1 month ago #

I'm building a site using a local install of 4.5.3
I've created a custom metabox to allow me to add an image to a post:

array(
                        'name' => 'Source image',
                        'desc' => 'Upload the source image',
                        'id' => 'crcr_br_source_image',
                        'type' => 'file'
                ),

When I either edit a post or add a new post the metabox displays as expected. However when I click 'add file' and choose the Media Library tab, I only see a few of the images that are in my Media Library. The images that I can see are all mp3 files - none of my jpg files are displayed. Where am I going wrong?

TonyWitham
Member
Posted 12 minutes ago #

Resolved by adding
library-type' => array( 'image', 'video' )

WordPress ...

ما را در سایت WordPress دنبال می‌کنید

برچسب: نویسنده: استخدام کار بازدید: 334 تاريخ: يکشنبه 3 مرداد 1395 ساعت: 23:43

صفحه بندی