Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter zeshan

    (@zeshan)

    plz help me guys, i am stuck:(

    Thread Starter zeshan

    (@zeshan)

    here is the function which control the links

    function image_link_input_fields($post, $url_type = '') {
    
        $file = wp_get_attachment_url($post->ID);
        $link = get_attachment_link($post->ID);
    
        if ( empty($url_type) )
            $url_type = get_user_setting('urlbutton', 'post');
    
        $url = '';
        if ( $url_type == 'file' )
            $url = $file;
        elseif ( $url_type == 'post' )
            $url = $link;
    
        return "
        <input type='text' class='text urlfield' name='attachments[$post->ID][url]' value='" . esc_attr($url) . "' />
        <button type='button' class='button urlnone' title=''>" . __('None') . "</button>
        <button type='button' class='button urlfile' title='" . esc_attr($file) . "'>" . __('File URL') . "</button>
        <button type='button' class='button urlpost' title='" . esc_attr($link) . "'>" . __('Post URL') . "</button>
    ";
    }

    “None” = image is not a link
    “Image URL” = clicking on image takes you directly to image file (http://{URL}/coolcar.jpg)
    “Post URL” = clicking on image takes you to a blog-post

    First I reccomend this

    1.Open your WordPress dashboard and Click on Settings.Then click “Miscellaneous”.
    2.Now change the default image upload folder which is wp-content/uploads.
    3. change the full url field and enter your second domain

    I’m not sure if this will effect your already entered file locations however.

    if that is script from the core of wordpress, I would stay away from it. If you are trying to change the url of all your featured post images I would maybe try to use mysql and do a find a reaplce for them. Although this might be risky. You might be able to do it on a the table where the featured images are held
    SELECT REPLACE(‘http://example.com’, ‘example’, ‘example2’);

    this is risky though. So if you find alternative methods, you should try that.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Featured Image’ is closed to new replies.