显示WordPress帖子附件
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了显示WordPress帖子附件相关的知识,希望对你有一定的参考价值。
taken from wordpress-- it took me a whole to find this on their site
// place inside loop 'post_type' => 'attachment', 'numberposts' => null, 'post_status' => null, 'post_parent' => $post->ID ); $attachments = get_posts($args); if ($attachments) { foreach ($attachments as $attachment) { echo apply_filters('the_title', $attachment->post_title); the_attachment_link($attachment->ID, false); } }
以上是关于显示WordPress帖子附件的主要内容,如果未能解决你的问题,请参考以下文章