WordPress.org

Ready to get started?Download WordPress

Forums

Link Category Sort (4 posts)

  1. gobae
    Member
    Posted 5 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 5 years ago #

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

    http://codex.wordpress.org/Function_Reference/get_bookmarks

  3. I3
    Member
    Posted 5 years ago #

  4. Pinoy.ca
    Member
    Posted 4 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;
    }
    add_filter('widget_links_args','widget_links_args_filter');

    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

Tags

No tags yet.