Filepages and Custom Post Types

WP-Filebase Pro introduces a custom post type with the slug wpfb_filepage, called Filepage. In third-party Plugins that support custom post type it appears as “File” (this singular name).

Filepages integrate into the WordPress post system and enable some known fuctionalities from Posts and Pages:

  • User comments on files
  • Navmenus
  • Tag Clouds
  • Other Plugins (e.g. file ratings, search like Relevanssi)

Filepages provide an interface for other plugins, like FacetWP (See FacetWP the demo)
WP-Filebase Pro files meta data for every file page that you can use in queries or templates. The fields basically are similar to the template fields from the file/category/list templates.

Meta KeyDetails
file_category_nameThe human-readable name of the file’s main category. If file has no category (in root folder), this meta key is not present.
file_custom_*Any custom field
file_hitsNumber of downloads
file_icon_urlFor use in templates:
<img class="thumb" src="<?php echo esc_url( get_post_meta( get_the_ID(), 'file_icon_url', true ) ); ?>" alt="<?php the_title_attribute(); ?>" />
file_idThe ID of the actual file the file page belongs to
file_is_publicIf the file is public, useful for query filtering (0 or 1)
file_sizeNumber. The size in bytes of the file, for sorting (like 74527)
file_size_formattedString. The formatted file size for use in a template (like “73.9 KiB”)
file_versionFile version string
file_urlHTTP(S) or FTP URL of the file
file_attach_order

When displaying a Filepage, WordPress falls back to the single.php template of your current theme. You can create a custom theme template for file pages, just create the file single-wpfb_filepage.php in your theme directory.

Custom Taxonomy: File Category

wpfb_file_category, other plugins can use it, you can create nav menus with it. Hierachical.

3rd party plugins

This is a not complete list of other plugins known to work with WP-Filebase and the its post type:

  • Relevanssi
  • GD Rating System
  • FacetWP