Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

So, I was thinking I'd use WordPress' Bookmarks/Links content type to populate a slider...

...Except there are a grand total of four functions interacting with this part of WordPress.

I don't think you can even access these with a WP_Query object, and it seems all date-related data attached to these is in relation to the last update of the link itself (I.e., when the linked-to page is updated).

Is there any way to even retrieve only the most recently-added bookmark?

(For more of a semi-related discussion question for the comments -- if this aspect of WP is so woefully underdeveloped 3 versions of the CMS in, why not just farm out this functionality to a plugin? Simply backwards compatibility?)

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

As far as I know it's not possible to query the links directly, but there is definetly a link_updated field in the wp_links table, so you can use wpdb to interact with it and return the latest (modified) links.

There's also a solution here.

EDIT : Updating a link doesn't change link_updated, but here is a plugin that can solve that : Link Updated Plugin

Auttomatically update the link_updated field when adding or editing a link, so you can use Links as a linklist.

EDIT 2 : If using the Links/Bookmarks functionality is too much of a hassle, as it seems it's really not as flexible as posts, you could also create a custom post type or a post format for Bookmarks and work with that.

share|improve this answer
    
Isn't the value of link_updated the timestamp of that link's content's last update? I.e., not when the link was added or updated in WP, but rather, when that link's content is updated? –  aendrew Jul 28 '11 at 3:31
    
You're right, I just tried on a testsite, when I update a link it doesn't change link_update. By looking for info on that, I found a plugin that may do that though (see updated answer) –  mike23 Jul 28 '11 at 7:20
    
Thanks, but half the reason for using weblinks in the first place was to avoid half of the templating work that goes hand-in-hand with custom post types... I've fallen back to just using a post category and custom fields in the meanwhile, but I'm still curious whether there's any way my above question can still be answered. –  aendrew Jul 28 '11 at 17:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.