Migrating to HTTPS only, most media library links need updating?

Here’s what I did (step 3 should probably solve your problem): 1. Update .htaccess File Add the following to the .htaccess file: RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L] 2. Update WordPress Site URL Navigated to Settings > General and update the WordPress Address (URL) and Site Address (URL) to https. 3. Update … Read more

How do I ‘rebuild’ the WordPress Media library after transfer to new host?

There’s a few plugins to fix this, but basically it your database still references the images to be “oldsite.com/wp-content/uploads/” and you need it to be “newsite.com/wp-content/uploads” So you have to change all old references. You could use SQL: UPDATE wp_options SET option_value = replace(option_value, ‘http://www.oldsite.com’, ‘http://www.newsite.com’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’; UPDATE … Read more

image_size_names_choose filter doesn’t show

No, that seems to work right. You could test it by doing <?php echo get_the_post_thumbnail(‘grade-image’); ?> try this. add_image_size( “grade-image”, 320, 300, true ); add_filter( ‘image_size_names_choose’, ‘my_custom_sizes’ ); function my_custom_sizes( $sizes ) { return array_merge( $sizes, array( ‘grade-image’ => __(‘Grade Image’), ) ); }

Bind event on Media gallery elements WordPress

(function ($) { “use strict”; $(function () { var button = $(‘.upload-image’); button.click(function (e) { e.preventDefault(); // If the media frame already exists, reopen it. if (file_frame) { file_frame.open(); return; } var btn = $(this), media = wp.media; // Create the media frame. var file_frame = media.frames.file_frame = media({ title: jQuery(this).data(‘uploader_title’), button: { text: jQuery(this).data(‘uploader_button_text’) … Read more