I am looking for easy styling list of .doc attachments in post. For example i want to put every in <li></li>
tags and do some proper styling.
So far I am get my post content this way:
<?php
query_posts('cat=13');
while (have_posts()) : the_post();
the_content();
endwhile;
?>
Retrieve the attachments
There’s a pretty unknown, but handy function in core:
get_children();
, which accepts an array of arguments. One of those ispost_mime_type
.If you’re unsure about the MIME types of your doc files, you can simply call
on your
single.php
(or whatever theme template displays your single attachments to see the exact MIME type.Here’s a non complete list of possible MIME types for MS Word files:
MarkUp
We then can puzzle together a list for them: