How to remove list view from media library?

This is a little hacky, but doesn’t require you to edit core files, which you should never do, as you are aware. add_action(‘admin_init’, function() { $_GET[‘mode’] = ‘grid’; }, 100); This will always force the mode into grid view. What it does not do, it does not remove the List View icon it does not … Read more

Media not actually deleted on disk when click “Permanent Delete”

So, after several attempts… it is a problem (or a feature) of the WPML multilanguage plugin. To start with, I have set up correctly the user permissions, as @WebElaine mentioned. Just in case something was not configures properly. More information on the following articles: Permissions to wp-content folder in Windows Server 2012 https://www.chillies.co.za/news/4421/The-Correct-Permissions-for-WordPress-on-IIS/ https://www.customfitonline.com/news/2013/6/20/solve-wordpress-on-windows-server-problems/ In … Read more

Different upload directory based on post type in a theme

If i understand your question right you want a function within your theme that adds directories for the current post_type? like: uploads/post_type_name. if so here is a function for that: function wpse_16722_type_upload_dir( $args ) { // Get the current post_id $id = ( isset( $_REQUEST[‘post_id’] ) ? $_REQUEST[‘post_id’] : ” ); if( $id ) { … Read more

Limit image resolution on upload

The problem isn’t so much the uploading itself, as that is a network connection between the client and the server. It’s not what’s eating the server’s memory. When WordPress starts ‘cruncing’ the images, that is where PHP comes in and start resizing and cropping the uploaded images. It is before this moment you need to … Read more

WordPress AJAX File Upload – FrontEnd

Hi You have Use this COde For WordPress front-end AJAX file upload tutorial Code Here is my code: In my template file example.php <form enctype=”multipart/form-data”> <input type=”text” name=”support_title” class=”support-title”> <input type=”file” id=”sortpicture” name=”upload”> <input class=”save-support” name=”save_support” type=”button” value=”Save”> </form> This is in ajax-file-upload.js jQuery(document).on(‘click’, ‘.save-support’, function (e) { var supporttitle = jQuery(‘.support-title’).val(); var querytype = … Read more

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