Forum Replies Created

Viewing 1 replies (of 1 total)
  • Not sure if you’re still looking for a solution.

    Here’s what I did:

    1. Goto Plugins->Editor, look for the Document Links Widget in the dropdown, press select and make sure you’re editing document-links-widget/rd-documentlinks-plugin.php
    2. Look for the following code on line 175:
    3. $result= $wpdb->get_results("SELECT ID, post_title, guid, post_mime_type, post_date FROM ".$wpdb->posts." WHERE post_type = 'attachment' ORDER BY post_date ".$sortOrder, ARRAY_N);

    4. Replace with the following code:
    5. 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);

    6. Now, when you want to associate a document to a certain page/post, just attach it in Media->Library, after you have uploaded it
Viewing 1 replies (of 1 total)