Results 1 to 4 of 4
Hybrid View
-
11th Mar 2012, 09:37 AM #1You can call me G
Fixed. For those interested in the solution and the cause of the problem:
the call to wp_get_archives() was being done inside an if block in this case which was not being executed (the condition being the absence of dynamic_sidebar() )
Hence to overcome this problem, we can use the `widget_archives_args` hook and add a filter accordingly. Therefore in functions.php
PHP Code:/* Limit the archive to 8 months
--------------------------------- */
function limit_archive($args) {
$args['limit'] = 8;
return $args;
}
add_filter('widget_archives_args', 'limit_archive');
Gaurav Reviewed by Gaurav on . Help with Listing Archives in Sidebar I am trying to reduce the number of archives listed in sidebar from all to 8 months. I looked up wordpress.org function reference for help and replaced: <?php wp_get_archives ?> with <?php wp_get_archives('type=monthly&limit=8'); ?> Rating: 5
My Langotiya Yaars (Chaddi buddies): JmZ, humour, Chutad, Esotorisk, l0calhost, Daniel, Mind Freak?, TLK, Amz
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Left Sidebar or Right Sidebar
By EsotorisK in forum Polling PlazaReplies: 18Last Post: 29th Jun 2012, 03:02 AM -
[Selling] Pay2Leech FTP - Over 30TB of archives | P2L
By arsenal4ever in forum Completed TransactionsReplies: 32Last Post: 28th Jun 2011, 02:35 PM -
How to add one file to multiple archives
By outbreak in forum Technical Help Desk SupportReplies: 3Last Post: 27th Apr 2011, 06:49 PM -
[Hiring] Unique Uploader/s (Passworded Archives)
By Exel in forum Completed TransactionsReplies: 22Last Post: 24th Dec 2009, 11:40 AM -
Joining MultiPart Archives
By Agrias in forum Tutorials and GuidesReplies: 0Last Post: 7th Jan 2008, 07:30 PM
themaManager - edit and manage...
Version 4.19 released. Open older version (or...