WordPress Automatic Filename Changer

The add_attachment action is called after the attachment has been named. If you only want to change the name of the attachment (and the slug), you don’t need to change the name of the file and can just replace the code inside rename_attachment with a call to wp_update_post. add_action(‘add_attachment’, ‘rename_attacment’); function rename_attacment($post_ID){ $new_attachment_name = array( … Read more

Gallery shortcode numerical sorting

It doesn’t look like you can do this with the gallery shortcode, unfortunately. The Codex doesn’t even list meta_value_num as an option (though that doesn’t mean it couldn’t work.) However, you’re correct, you must specify a meta-key to use that ordering scheme with WP_Query.

Upload box media size not working

I know it’s a bit late, but I’m having the same problem and looking for a solution. This other question seems to describe the same problem, and the solution is that maybe the needed image libraries (GD or ImageMagick) are not included by the server configuration. That was the case for me. I hope this … Read more

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