Support » Plugin: WP Document Revisions » Echoing File Type on Front End

Viewing 2 replies - 1 through 2 (of 2 total)
  • I have looked through the code cook book and I cannot figure out how to get this part done.

    Try using the global $wpdr class.

    So let’s say I did:
    $posts = get_posts ( array( 'post_type' => 'document' ) );

    And it returned an array with one document in it, I could do:
    $wpdr->get_file_type( $posts[0] );

    And that would return the file type of that post. Feel free to post back here if you’re still having issues implementing it.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Echoing File Type on Front End’ is closed to new replies.