WordPress 3.5 Media Uploader – Only allow 1 upload and certain file types

The file types that you have specified ‘application/msword’, ‘application/vnd.ms-excel’, ‘application/pdf’ are already supported by media uploader. To see the default supported mime file types, call wp_get_mime_types() function. Use upload_mimes filter as shown in following code to make media uploader to accept files types other than the default. Add following code in your themes functions.php file … Read more

Exclude an array

Strange but it works with same principle I was trying to. Maybe I had some grammer error. Here is a code if somebody will need it in future as there was nothing in search result: // get product media library $mediaArgs = array( ‘post_type’ => ‘attachment’, ‘post_mime_type’ => ‘image’, ‘numberposts’ => -1, ‘post_status’ => null, … Read more

Too many connections to server

I contacted my hosting provider to solve this problem and they claim that my wordpress is generating too many simultaneous connections to server… The only times I’ve seen hosts put limits on the number of MySQL connections is when the host is free or very cheap or incompetent. Is it free hosting? It’s really easiest … Read more

Cannot upload anything via wordpress

Right, I’ve managed to solve the problem. Maybe this answer helps other people who encounter the issue again. The problem is inherently in the installation procedure when installing via the package manager in ubuntu. The actual issue was in the database configuration, the installation had set WP_CONTENT_DIR to /srv/www/wp-content/localhost, a directory I did not even … Read more

Set a custom URL for image in the Media Library?

Sharing my thoughts on multiple issues you mentioned. Hoping one or two of the following would help… Firstly, you may visit your site’s wp-admin/options-media.php and uncheck the option “Organize my uploads into month- and year-based folders” Why can it only be attached to ONE post/page? An image can be attached to any number of posts … Read more

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