• jstneti

    (@jstneti)


    I have a site with over 1000 posts and all the images in them are set to ‘Link to Custom URL’. What I want is to change all those images to link to ‘Media file’, because I would like to use Responsive Lightbox on them.

    Does anyone know how to do that?
    I’ve checked around and all I could find were old posts that suggested using this:

    function wpb_imagelink_setup() {
    	$image_set = get_option( 'image_default_link_type' );
    
    		update_option('image_default_link_type', 'file');
    
    }
    add_action('admin_init', 'wpb_imagelink_setup', 10);

    but this doesn’t work.

    Any ideas?

  • The topic ‘Change 'Link to X' to 'Link to Media files' on already inserted images!’ is closed to new replies.