2

i want every image present on my wordpress site with setting "link to: none" or "link to: post url" became in "link to :image url"

ho make this for old post and for new post ?

i tried this code in function.php of my theme but not work :

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);

or

function wpb_imagelink_setup() {
    $image_set = get_option( 'image_default_link_type' );


        update_option('image_default_link_type', 'image url');

}
add_action('admin_init', 'wpb_imagelink_setup', 10);

attention: this for photo also with external URL

http://postimg.org/image/msymf73zp/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.