[wp-testers] Attachment Pages for Non-Standard Post Format Types

Chip Bennett chip at chipbennett.net
Tue Jan 11 19:10:32 UTC 2011


It's easy enough to work around using get_post_format( $post->post_parent ),
but to give you an idea of the use case that made me ask the question: for
my image.php, I display a sidebar of meta information, as well as
thumbnails/links to previous/next images in the "gallery" (images attached
to the parent post). But, for an "image" post format type, the image
attachment will (should?) always be an only child, so I don't want to
display the thumbnails/links to previous/next images.

Perhaps I answered my own question: the information regards the post parent,
so it makes the most sense to refer back to $post->post_parent, rather than
pass the post format type metadata down to the child attachment post.

Chip

On Tue, Jan 11, 2011 at 12:22 PM, Nathaniel Taintor <
goldenapplesdesign at gmail.com> wrote:

> In my opinion, the way WordPress currently handles attachments, by
> mime-type, makes more sense for attachments than trying to fit attachments
> into the post format structure.
>
> Attachments of mime-type "audio/mp3", for example, will be served by
> template file audio.php, then mp3.php, then audio_mp3.php, and then finally
> attachment.php. This gives you a chance to handle formats pretty well in
> your theme files.
>
> What use do you have in mind where you would need to check the parent
> post's
> format in order to display the attachment?
>
>
> Nathaniel Taintor, Designer/Developer
> *Golden Apples Design*
> http://goldenapplesdesign.com
>
>
> On Tue, Jan 11, 2011 at 8:40 AM, Chip Bennett <chip at chipbennett.net>
> wrote:
>
> > Attachment pages for attachments to all posts (regardless of Post Format
> > type) currently are given a Post Format type of "standard" (i.e. NULL).
> >
> > Wouldn't it make sense for attachment pages for media-type Post Formats
> > (audio, video, gallery) to be given a Post Format type that is the same
> as
> > the Parent Post?
> >
> > Or, is this by design?
> >
> > Chip
> > _______________________________________________
> > wp-testers mailing list
> > wp-testers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-testers
> >
> _______________________________________________
> wp-testers mailing list
> wp-testers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-testers
>


More information about the wp-testers mailing list