WordPress.org

Ready to get started?Download WordPress

Forums

My Link Order
mylinkorder_get_bookmarks() doesn't order by "link_order" (2 posts)

  1. dashaluna
    Member
    Posted 2 years ago #

    Hello,

    It seems that mylinkorder_get_bookmarks() doesn't order by "link_order" parameter.

    I've got the following code:

    $social_follow_links = mylinkorder_get_bookmarks(array(
    							"category_name" => "Social Follow",
    							"order" => "ASC",
    							"orderby" => "link_order")
    						);

    but it always returns the links/bookmarks in the name order, not link_order. When I update an order of the links/bookmarks in the WP admin by dragging-and-dropping the link_order attribute gets updated.

    Is there different way to do it? I need to use mylinkorder_get_bookmarks() as I'm constructing my own HTML for links.

    Many thanks

    http://wordpress.org/extend/plugins/my-link-order/

  2. maorb
    Member
    Posted 2 years ago #

    You should use orerby order, since WP adds the links_ prefix, so this would work for you:

    $social_follow_links = mylinkorder_get_bookmarks(array(
    	"category_name" => "Social Follow",
    	"order" => "ASC",
    	"orderby" => "order")
    	);

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic