Forums

Document Links Widget
Extend on single page output (1 post)

  1. rwilki
    Member
    Posted 4 months ago #

    Yacroon came up with some great code to make the widget display only the documents attached to a single page. But, if I have 5 pages that are siblings, it would be so cool if all 5 pages could share the same document list display.

    Here's his code...
    global $post; $result= $wpdb->get_results("SELECT ID, post_title, guid, post_mime_type, post_date FROM ".$wpdb->posts." WHERE post_type = 'attachment' AND post_parent = ".$post->ID." ORDER BY post_date ".$sortOrder, ARRAY_N);

    http://wordpress.org/extend/plugins/document-links-widget/

Reply

You must log in to post.

About this Plugin

About this Topic