I have and succeed.
How to post_mime_type different?
I have added the post_mime_type in functions.php
add_filter('upload_mimes', 'pixelo_upload_types');
function pixelo_upload_types($existing_mimes=array()) {
$existing_mimes['otf'] = 'otf';
$existing_mimes['ttf'] = 'ttf';
return $existing_mimes; }
then I tried here and it did not work.
<?php
$args = array(
'numberposts' => -1,
'orderby' => 'menu_order',
'order' => 'ASC',
'post_type' => 'attachment',
'post_parent' => $post->ID,
'post_mime_type' => 'ttf'
);
$font = get_posts($args);
if($font) {
foreach($font as $key => $data) : ?>
<option value="<?php echo $data->ID; ?>"><?php echo $data->post_title; ?></option>
<?php endforeach;
} ?>
Please help me. Please help me. How can I make it?
Related Posts:
- Stop wordpress from hardcoding img width and height attributes
- how to get original image using wp_get_attachment_image_src
- Add new image size to media uploader so users can insert into post?
- How to insert pictures without hard coded dimensions?
- How to modify image editor dialog options on WordPress?
- Is there a hook which fires after all thumbnails are generated?
- How do I delete all generated images from my server except those currently used in posts
- “There has been an error cropping your image” when cropping image
- Apply image width to tag
- Excludes posts that don’t have attachments in the_content()
- Remove duplicate images from media library.
- WordPress Image Editor doesn’t update thumbs specified with `add_image_size()`
- How can you upload an image from within a settings page?
- Get an image from url in front end submission form
- Why would image paths in wordpress suddenly change?
- Add visual editor to Media Edit Screen
- Show prev and next post links for parent post of current image in attachment page?
- could not upload image in media library
- Check if page/post has any anchors that link to an image jpg/gif/png
- How to check if user is uploading/setting an image as a featured image?
- Use Gravatar as fallback image if no local image is not found
- add the post as canonical for attachment page wordpress
- Retrieving an alt tag from a custom field
- Exclude featured image from gallery in wp-admin
- Trying to create a mouseover effect in html using Gutenberg editor
- How to output images as figure/figcaption
- wordpress get gallery images title
- How to fix “.webp” being auto-added to the end of image urls
- Customizing the attachement page to show rest of all images in a gallery from post
- having issue while uploading An error occured in the upload. Please try again later
- How to change image atributes right before an image to be saved?
- Is it possible to change ‘Link to’ in all images in all articles?
- Is it possible to put images as url in document [closed]
- Creating ‘required’ fields in the ‘add media’ window
- Importing images results to wrong folder structure
- WP keeps looking up post thumbnail on https even though wp-config says http
- How to post a mosaic of an image gallery instead of the entire gallery inside a post’ [closed]
- using media_sideload_image with a file from theme directory
- Upload image without media-upload [duplicate]
- Tinymce and uploading local pictures
- Time Based change of image
- WordPress shows my picture in admin bar
- Where is the right place to store custom images?
- Using jQuery to automatically add class only to gif images in WordPress database [closed]
- how to get image full path from WP_Post Object?
- Featured Image problem with resizing
- WordPress Image Scaling Quality
- Create a post from every image in my media gallery
- Not seeing text alignment option in Image block
- wp_get_attachment_url images in wrong order [closed]
- Migrated site – Images have 404 error
- Show (print) featured image all dimensions (height, width)
- Speed Up Website With High Resolution Images
- Serve different images per screen size and cache possible?
- Removing Images from a WordPress Post
- How come the images arent loading properly?
- How to use the thumbnail size with catch_that_image
- Random Image Script Working but Want to Avoid Duplicates
- HTML Img with data:image src gets sanitized in admin?
- Can’t find image to remove
- How to add a custom class to all the images for a page only?
- Not able to retrieve image id from sibling site within a switch_to_blog
- How to display a warning when an uploaded image is too small?
- How to link image in WordPress – Elementor when certain element does not offer that option?
- Large uploaded images not resizing?
- How can i place featured image after h2
- How to generate alt attributes with php / filters?
- Custom image size not displaying with wp_get_attachment_image()
- unsharp thumbnails after uploading image
- How to delete original image file after upload and resize
- Convert multiple image blocks to gallery block in Gutenberg?
- WordPress After migration some images src is empty
- Access html element in media modal with jQuery
- Jetpack Lazy load images fade in
- add alt text to images loaded from json with media_sideload_image
- How to get featured image of last post in a category?
- How can I add “alt” tag to element?
- How to make image uploads default to full size?
- WordPress images programatically display error
- Recovered WordPress installation (on localhost) links broken and images not showing
- Image is missing on site homepage
- Media sizes do not appear
- How to make Facebook share the featuterd image from url on WordPress
- Changing current post image uls with a function
- Display images in template file
- Surround uploaded image link with div
- Check if post has image
- How to get children/attachments in header?
- Show title when inserting single images
- How do I mitigate the forward slash problem for URLs of images after a WP migration?
- WordPress file browser
- how do i update version for super skeleton
- Best Photoshop-WordPress workflow for editing images without re-upload [closed]
- How to import external media items into wordpress media library (without using storage)
- I am having trouble displaying an image at the top of a widget area [closed]
- How to return responsive images from a sanitize_callback?
- How to disable Right Click on a image? [closed]
- Can’t upload svg files in WordPress
- Images uploaded in customized gallery do not link to media
- WordPress Site Broken and it gives Headers Already sent error