Query All Attachments and Order by Parent Publish Date

After spending some time reading the documentation for WP_Query’s Order & Orderby Parameters I found the following listed parameter to almost get me there: ‘post__in’ – Preserve post ID order given in the post__in array (available since Version 3.5). Unfortunately I wasn’t using post__in but rather post_parent__in so ordering by post__in didn’t work. It wasn’t … Read more

Removing delete permanently button in uploading files media

This might do the trick! css: .media-sidebar .details .edit-attachment { display: none; } .media-sidebar .details .delete-attachment { display: none; } And this: foreach( array( ‘post.php’, ‘post-new.php’ ) as $hook ) add_action( “admin_print_styles-$hook”, ‘admin_styles_so_25894288’); function admin_styles_so_25894288() { global $typenow; if( ‘post’ !== $typenow ) return; ?> <style> .media-sidebar .details .delete-attachment { display: block; } .media-sidebar .details … Read more

Redirect attachment URL

You can do this in code, htaccess, or go the fastest way to get it done reliably using a redirection plugin. Here are three redirection plugins vetted by WordPress VIP: https://vip.wordpress.com/plugins/safe-redirect-manager/ https://vip.wordpress.com/plugins/wpcom-legacy-redirector/ https://vip.wordpress.com/plugins/external-permalinks-redux/ And here’s a link to the one I use on sites: https://wordpress.org/plugins/redirection/ (glance at the number of active installs 400,000+)

WP media attachment location vs permalink

I think a possible solution could be following codesnippet from Mark Kaplun. To solve issues with this you could remove the http part and WordPress will/should use https instead. Because the rest of your website is working correctly I assume that further settings are correct and will do their job as wished. add_filter(‘the_content’,’wpse_217012′,1000,1); // remove … Read more

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