How can I autopopulate titles in the media library?

If you can do SQL manually then try: UPDATE wp_posts p INNER JOIN wp_posts q ON p.post_type=”attachment” AND p.post_mime_type LIKE ‘image/%’ AND (p.post_title IS NULL OR LENGTH(p.post_title) = 0) AND p.post_parent = q.ID SET p.post_title = q.post_title; If you need a PHP function then try: function set_image_without_title_to_post_title() { global $wpdb; $sql = sprintf( “UPDATE %s … Read more

Custom image size not regenerating when image editted

To regenerate custom image size when image is edited in image editor , You have to add following options in wp_options table using update_option function along with add_image_size. Example : $img_size_name=”custom-size”; // The new image size name. if ( function_exists( ‘add_theme_support’ ) ) add_image_size($img_size_name, 100, 100 , true); update_option($img_size_name.’_size_w’, 100); update_option($img_size_name.’_size_h’, 100); update_option($img_size_name.’_crop’, 1);

How to Optimize images after uploading all images to WordPress Site?

You can optimize uploaded image in wordpress by EWWW Image Optimizer. This plugin giving facility for bulk optimization. So you can compress and optimize image very easily. Also this plugin optimize images according proportion. So optimized image not losing quality. It is very best plugin for image optimization.I am currently using this plugin.

Retrieving images from a NextGEN gallery

For anyone interested I found a solution to what I wanted. You simply need to create a custom template Then I accessed the images like this: <?php foreach ($images as $image) : ?> <?php echo do_shortcode(‘[singlepic id=”‘ . $image->pid . ‘”]’); ?> <?php endforeach; ?>

Add a featured image in my theme?

You need to add theme support in the functions.php file of your active theme like this: if ( function_exists( ‘add_theme_support’ ) ) { add_theme_support( ‘post-thumbnails’ ); } To enable it within a custom post type, you will need to do so when registering your post type with the supports argument, so you’ll need to add … Read more

Link Featured Thumb to Attachment Page, If Possible

Question 1: How do you link Featured Image to its Attachment Page In the loop: <?php if( has_post_thumbnail() ) : ?> <a href=”https://wordpress.stackexchange.com/questions/52394/<?php echo get_attachment_link( get_post_thumbnail_id() ); ?>”> <?php the_post_thumbnail(); ?> </a> <?php endif; ?> Question 2: Post Format Templating Post formats are actually just a custom taxonomy with a fancy UI. Hence, you should … Read more

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