Support » Plugin: Media Custom Fields » [Plugin: Media Custom Fields] Display content of custom fields in the front end

  • First off this is a really great plugin and thank you very much for creating it.
    I have a gallery website with a custom post type for each group of works. The works are added via the media uploader and displayed as a carousel using jquery.
    I have it set up to display the Title and Description field for each image. The code for that part of the gallery looks something like the following:

    switch ( substr( get_locale(), 0, 2 ) ) {
    			case 'en' :
    				$title = get_post_meta( $img_id, '_title_en', true );
    				$title = ( !empty( $title ) ) ? $title : get_the_title( $img_id );
    				$description = get_post_meta( $img_id, '_description_en', true );
    				$description = ( $description ) ? $description : $img_post_data->post_content;
    				break;
    			default :
    				$title = get_the_title( $img_id );
    				$description = $img_post_data->post_content;
    				break;
    		}
    
    		$html .= '" alt="' . $title . '" width="' . $medium[1] . '" height="' . $medium[2] . '" data-alternative="' . $large[0] . '" />';
    		$html .= '</div>';
    		$html .= '<div id="gallery-description">';
    		$html .= '<p id="caption">' . $title . '</p>';
    		$html .= '<p id="description">' . $description . '</p>';
    		$html .= '</div>';
    		echo $html;

    How would I display the information in the custom media fields too?

    Help on this would be greatly appreciated. Thanks in advance!

    http://wordpress.org/extend/plugins/media-custom-fields/

Viewing 1 replies (of 1 total)
  • It seems that the developer has dropped this excellent plugin.. hopefully someone else with good PHP chops will finish it and make it user friendly.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Media Custom Fields] Display content of custom fields in the front end’ is closed to new replies.