WP Document Revisions
Echoing File Type on Front End (3 posts)

  1. webrob
    Posted 2 years ago #

    I have looked in the code and I see that there is a function for get_file_type() & get_file_type().

    How can I get those to echo on the front end???


  2. webrob
    Posted 2 years ago #

    I have looked through the code cook book and I cannot figure out how to get this part done.

  3. cojennin
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Document Revisions
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.