tonyvernetti
Member
Posted 3 years ago #
How do I change the sort order of the links in a link category? I do not see this as an option when I edit the link category, but in the codex I see it in the instructions, with a graphic showing a different link category screen:
Instructions:
http://codex.wordpress.org/Links_Manager#Adding_a_Category
Graphic:
http://codex.wordpress.org/Image:Managing_Links-addlinkcat.png
That whole interface has changed significantly since WP 2.0. The ordering of links and link categories is handled at the template level now using the 'category_orderby' and 'orderby' arguments from the wp_list_bookmarks function.
I also publish a plugin, My Link Order, that lets you specify your own order.
tonyvernetti
Member
Posted 3 years ago #
Thanks for your awesome plugin. It seems strange that they would remove these controls from the link category settings. Many thanks again!
I have it like this: wp_list_bookmarks('orderby=rand&title_before=<h1>&title_after=</h1>&between=
&show_description=1&limit=20');
So where I should put orderby=order etc ??
It just show this: Updating Link Order... and then nothing happen.
egurevich
Member
Posted 2 years ago #
I just installed the plugin and for me also it updates the order, but when I reload my blog the order is the same as it was before. Do I need to add some code somewhere?
egurevich
Member
Posted 2 years ago #
never mind. I didn't realize that I had to change widget from the regular Links to My Links Order.
Thanks
Awesome plugin
noab8898
Member
Posted 2 years ago #
The My Link Order Widget does not show up in my sidebar. Is there something additional I need to do? I've set everything up in settings.
Pinoy.ca
Member
Posted 2 years ago #
How do I change the sort order of the links in a link category? I do not see this as an option when I edit the link category
No need for an additional plugin, tony/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.