#14440 closed enhancement (invalid)
Override filter for adjacent_post_link()
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0 |
Component: | Template | Keywords: | reporter-feedback |
Focuses: | Cc: |
Description
I'm working on a plugin that needs to integrate with as many themes as possible. It's basically a plugin for creating portfolios of images. It uses a custom post_type "piece" and allows for each piece to have multiple images attached to it. I've created a widget that lists thumbnails for all attached images that link to the attachment page for each one. On the attachment page, I am querying for the parent piece to display the title, content, excerpt, edit link, etc.
I'm also trying to replace the previous and next links with the values that would be generated for the parent. I've gotten pretty far along when I noticed that adjacent_post_link() is set to display only a previous link when an attachment has been queried. I was wondering if a filter could put put in place somewhere before this conditional is defined. Please see attached file.
Thanks for reading!
That's not quite the logic. If it's an attachment and it's looking backward, it uses the post parent. Otherwise, it calls get_adjacent_post(). That function in turn makes some queries.
Can you re-evaluate?