When inserting media file in a post or page, show file name under the thumbnail

By default, WordPress doesn’t provide a built-in option to sort media attachments by file name in the media library interface. However, you can achieve this programmatically or with the help of plugins. Using Plugins: Plugins like “Media Library Assistant” or “Media Library Categories” offer advanced sorting and filtering options for the media library, including sorting … Read more

Get Specific Files (Only Specific Extension Type All Files in Loop ) from Media

You don’t need to use strpos() to figure out the extension because you’ve already parsed the URL above and stored the extension in $AllAtachmentURLextension, so all you need to do is //for Specific Extensions if( ‘docx’ == $AllAttachmentURLextension ) { // docx handling here } elseif ( ‘pdf’ == $AllAttachmentURLextension ) { // pdf handling … Read more

audio tags no longer working

You may need to update your shortcode function to generate the audio player using proper HTML markup instead of returning the raw shortcode text. Here’s an example: function myshortcode_shortcode() { $audio_url=”path/file.mp3″; $audio_markup = ‘<audio controls><source src=”‘ . esc_url($audio_url) . ‘” type=”audio/mp3″></audio>’; return $audio_markup; }

Media Library Issues

What you need is a way to scan your uploads directory and register any unregistered files. There are plugins that can help with this. One such plugin is “Add From Server“. This allows you to import media and files into the WordPress uploads manager from the server’s file system. Using this plugin, you can import … Read more

stop resize button for wordpress media

That’s a bit tricky because WordPress doesn’t offer this functionality out of the box. But a workaround would be to stop WordPress from generating additional image sizes for uploaded images. But it will apply to all image uploads, not just those in the WooCommerce product gallery. If you wanted to try it out, here’s the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)