Display img upload feild

Support MB Settings Page Display img upload feild

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2766
    Infolu OfficialInfolu Official
    Participant

    I have broken my head, how to display an image made by the upload box target within a settings page.

    my code http://pastebin.com/1KjbybVZ

    Can anyone give me a practical example?

    #2770
    Infolu OfficialInfolu Official
    Participant

    I managed to get the url of the image if someone need to follow the code I used.

    
    $settings = get_option( 'ims_company' );
    $field_id = 'extra_my_logo_company';
    $display_pre = current( $settings[$field_id] );
    $display = wp_get_attachment_url( $display_pre );
    echo '<img src="' .$display.'" alt="Profile" />'; 

    Tranks

    #2797
    Anh TranAnh Tran
    Keymaster

    Thanks for sharing your solution!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Display img upload feild’ is closed to new replies.