• Do you know any way to show file types and sizes for attachments on search result pages? I know there’s a way to do it for single posts/pages but not sure how it would be done in search results.

    Same like how posts show their categories and tags, it would be nice if indexed attachments would show file type and size on result pages.

    Thank you.

Viewing 1 replies (of 1 total)
  • Plugin Author Mikko Saari

    (@msaari)

    You do it the same way you’d do it on the single post page, but on the search results template. Check the post type from $post->post_type and if that’s ”attachment”, display the file information. The exact details depend on your theme.

Viewing 1 replies (of 1 total)
  • The topic ‘File Types & Sizes’ is closed to new replies.