How to force Media manager to overwrite files of same name?

Here is something i cooked up which was taken mainly from the plugin Overwrite Uploads but without the extra stuff add_filter(‘wp_handle_upload_overrides’,’noneUniqueFilename’); function noneUniqueFilename($overrides){ $overrides[‘test_form’] = false; $overrides[‘unique_filename_callback’] = ‘nonUniqueFilenameCallback’; return $overrides; } function nonUniqueFilenameCallback($directory, $name, $extension){ $filename = $name . strtolower($extension); //remove old attachment removeOldAttach($filename); return $filename; } function removeOldAttach($filename){ $arguments = array( ‘numberposts’ => … Read more

Why doesn’t /2013/01/ properly return January’s archives in archive.php?

Don’t use query_posts in the template for simple modifications of the main query. Use the pre_get_posts action instead to modify the query before it runs: function wpa_date_posts_per_page( $query ) { if ( !is_admin() && $query->is_date() && $query->is_main_query() ) { $query->set( ‘posts_per_page’, 5 ); } } add_action( ‘pre_get_posts’, ‘wpa_date_posts_per_page’ );

Specify image dimensions

In your theme’s functions.php file you can add add_image_size( ‘thumb’, 600, 350, true ); add_image_size( ‘thumbnil’, 600, 350, true ); add_image_size( ‘medium’, 600, 350, true ); add_image_size( ‘large’, 600, 350, true ); add_image_size( ‘post-thumbnail’, 600, 350, true ); add_image_size( ‘{custom-image-type}’, 600, 350, true ); For more information have a look at http://codex.wordpress.org/Function_Reference/add_image_size

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