delete attachment from front end

ended up using ajax in the end… html; <a class=”remImage” name=”<?php echo $attachment->ID; ?>” href=”#”><?php _e(‘delete’);?></a> <input type=”hidden” id=”att_remove” name=”att_remove[]” value=”<?php echo $attachment->ID; ?>” /> <input type=”hidden” name=”nonce” id=”nonce” value=”<?php echo wp_create_nonce( ‘delete_attachment’ ); ?>” /> jquery $(‘.remImage’).live(‘click’, function() { var attID = jQuery(this).attr(‘name’); jQuery.ajax({ type: ‘post’, url: ‘/wp-admin/admin-ajax.php’, data: { action: ‘delete_attachment’, att_ID: jQuery(this).attr(‘name’), … Read more

Delete Post With No Traffic?

First, you need a list of all available URIs. You may use my plugin T5 All URIs for that. Just activate and go to your blog on /alluris/. There is also a link to the file in your plugin list after activation. Then you need your log files, ideally one file with all requests from … Read more

Removing fields from the Media Uploader/Gallery

You can do this via a filter. Add the following to functions.php. You can also add your own fields this way… // edit fields in media upload area add_filter(‘attachment_fields_to_edit’, ‘remove_media_upload_fields’, 10000, 2); function remove_media_upload_fields( $form_fields, $post ) { // remove unnecessary fields unset( $form_fields[‘image-size’] ); unset( $form_fields[‘post_excerpt’] ); unset( $form_fields[‘post_content’] ); unset( $form_fields[‘url’] ); unset( … Read more

Sort post by attributes ‘order’

Well, I’m afraid it won’t work this way. Let me explain why… In your wpzen_change_post_order function you check if $query->is_main_query(). To be precise, this checks, if given query is main query for current page – the query generated by WP to display default posts for current page. So if you create your own WP_Query object, … Read more

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