Link Category Sort (4 posts)

  1. gobae
    Posted 7 years ago #

    The link categories I create sort themselves in alphabetical order and therefore display that way in the sidebar.

    Is there a way to specify what order I want them in? I've been looking through the docs, and menu options but haven't come up with anything. I've also looked at the php, but without knowing where it's sorting it was fruitless.

  2. esmi
    Forum Moderator
    Posted 7 years ago #

    You could try using get_bookmarks and then sort the resulting array yourself.


  3. I3
    Posted 7 years ago #

  4. Pinoy.ca
    Posted 6 years ago #

    Is there a way to specify what order I want them in?

    Guys, use the widget_links_args filter. It's very easy.

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

    You can paste this code anywhere, such as your theme's function.php.

    I hope this helps.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.