Posts Tagged ‘widgets’

WordPress: too clever for its own documentation!

by

Any time you start using Widgets you forgo control and sometimes you need to take it back! A while ago I needed to control the sort orderĀ  of the Links widget and found the “right way” to do it. Today, I needed it again but could I find the documentation anywhere?

In the end I found it at the bottom of a thread answered by Pinoy.ca.

All you need to do is find the functions.php file for your theme and add

function widget_links_args_filter($args) {	$args['orderby'] = 'rating';  // Sort links by rating	$args['order'] = 'DESC';      // descending	return $args;}add_filter('widget_links_args','widget_links_args_filter');

Its easy to understand what you’re doing once you have that small example. A shame, I guess, that sort order isn’t able to be set in the widget itself but if you need to make the change this is so much safer than messing with the source code as some sites recommend.

widget_links_args – try searching on Google or WordPress.org, you won’t find any official documentation for this function. Crazy!


cheap deal pill viagra viagra Viagra Canada viagra and street drugs
generic viagra gel tab Purchase Viagra best place to buy viagra
effects of viagra mixed with cocaine! Guaranteed Cheapest Viagra where can i get free viagra!
viagra for plants Natural Viagra Smode su viagra webrb int mc smoking viagra 431.
Viagra depression women viagra derivatives 471. Natural Viagra Substitutes viagra pre and post!

Another Widgets exponent

by

I downloaded the Widgets plugin for WordPress the other day and didn’t think I’d have time to check it out for a bit but I took 5 minutes today to install it on my experimental WPv2 blog. Well, the install took seconds, I activated it, and had it setup in no time at all.

The only shame is that once you’ve played with it you have no reason to continue doing so.