Timeline for Getting attachment post using wp_get_attachment_link
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 10, 2012 at 14:40 | comment | added | Mamaduka |
For pulling images from whole network, you'll need to use switch_to_blog() function, but it's expensive function so you should be careful when using it - codex.wordpress.org/Function_Reference/switch_to_blog
|
|
Mar 10, 2012 at 14:30 | comment | added | jw60660 | Yes, multisite, thank you. By the way, what you recommended is resulting in the images pulling nicely, but the images link to one post on the main site in my multisite installation. I am posting the exact code I used above. Thanks! | |
Mar 10, 2012 at 14:19 | comment | added | Mamaduka | As network you mean WordPress Multi-Site? | |
Mar 10, 2012 at 14:06 | comment | added | jw60660 | If you don't mind me asking, if I wanted to pull attachments from a network, what changes would I make to this attachment loop? | |
Mar 10, 2012 at 13:48 | vote | accept | jw60660 | ||
Mar 10, 2012 at 13:37 | comment | added | Mamaduka |
You're welcome. Yes I know that, that's why you'll need get_permalink() , see update answer.
|
|
Mar 10, 2012 at 13:36 | history | edited | Mamaduka | CC BY-SA 3.0 |
added 416 characters in body
|
Mar 10, 2012 at 13:07 | comment | added | jw60660 | Thanks for the reply. I would, however, like the image to link to the post and not the image page or image. Sorry if I was confusing in my question. | |
Mar 10, 2012 at 10:58 | history | answered | Mamaduka | CC BY-SA 3.0 |