• I’ve managed to associate certain documents with certain pages on my site using the special code posted in this forum and attaching documents to my pages. What if I want to limit the widget on these pages to showing only 5 or 10 documents total in descending order by date? Is there code I can modify or add in the plugin to accomplish this? Basically, it’s supposed to function as a “most recent files” widget.

    Thanks!

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

Viewing 1 replies (of 1 total)
  • I Can to help… see please, can to add :

    /*ascending or desc order*/

    if (isset($_POST[‘update_RD_Document_Links’])){
    if(($_POST[‘order’])==’ascending’){
    $listOrderOptions[‘display_order’] = “ascending”;
    $this->sortOrder = ‘ASC LIMIT 5’;
    }else{
    $listOrderOptions[‘display_order’] = “descending”;
    $this->sortOrder = ‘DESC LIMIT 5’;
    }
    update_option($this->listOrderOptionsName, $listOrderOptions);
    }

    AND

    function rd_query_db(){
    global $wpdb;
    $sortOrder;
    $order = $this->rd_get_list_order();
    if($order){
    if ($order[‘display_order’] == ‘ascending’){
    $sortOrder = ‘ASC LIMIT 5’;
    }else{
    $sortOrder = ‘DESC LIMIT 5’;
    }
    }

    BYE…

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Document Links Widget] Can you limit the number of files displayed?’ is closed to new replies.