How To Reset Ownership And Permissions of Wp-Content Folder, In Order to Fix HTTP Error When Uploading Images to WordPress Media Library

try increasing WordPress Memory Limit to 256M The most common cause of this error is lack of memory available for WordPress to use. To fix this, you need to increase the amount of memory PHP can use on your server. You can do this by adding the following code to your wp-config.php file. define( ‘WP_MEMORY_LIMIT’, … Read more

Remove the ‘Attachment Details’ section of the wordpress media manager

I use CSS for that: add_action(‘admin_head-post.php’, ‘hide_media_stuff_wpse_120894’ ); add_action(‘admin_head-post-new.php’, ‘hide_media_stuff_wpse_120894’ ); function hide_media_stuff_wpse_120894(){ ?> <style type=”text/css”> .attachment-details [data-setting=”title”], .attachment-details [data-setting=”caption”], .attachment-details [data-setting=”alt”], .attachment-details [data-setting=”description”], div.attachment-display-settings { display:none } </style> <?php }

delete a photo tag in rtmedia [closed]

It is fixed in v2.2.4. I suggest you to update your plugin. Or you can do it by adding following condition in tag rendering foreach loop RTMediaPhotoTag.php > function tag(){…} if(get_user_by(‘id’, $tagged) === false ){ $this-> delete_tag($tagged,$media_id); continue ; } You should post this issue on rtmedia support forum

Delete Associated Media Upon Page / Post Deletion

Just for clarity: borrowing from this answer, add the following to your theme’s functions.php: function wpse_188427_delete_post_media( $post_id ) { $attachments = get_posts( array( ‘post_type’ => ‘attachment’, ‘posts_per_page’ => -1, ‘post_status’ => ‘any’, ‘post_parent’ => $post_id, ) ); foreach ( $attachments as $attachment ) { wp_delete_attachment( $attachment->ID ); } } add_action( ‘before_delete_post’, ‘wpse_188427_delete_post_media’ ); // Uncomment … Read more

Adding a character counter to the excerpt metabox

Ok, so I didn’t like the way that was written, so i slightly rewrote it with different syntax, and more readable structure. <?php // Add Character Counter to the Excerpt Meta Box function excerpt_count_js(){ if (‘page’ != get_post_type()) { ?> <script> (function($){ $(document).ready(function(){ if ( $(‘#postexcerpt’).length ) { var maxChar = 128; $excerpt = $(‘#excerpt’); … Read more