eskaigualker
Member
Posted 5 months ago #
I must show the content of a post outside the loop.
The post contains the shortcode [attachments..] with few options.
As usual, to have the content output I do this: apply_filters('the_content',$post->post_content).
This works correctly with other plugins, but not with EG-Attachments.
What's the problem?
Thank you.
http://wordpress.org/extend/plugins/eg-attachments/
EmmanuelG
Member
Posted 4 months ago #
The plugin isn ot working out of the loop, because it needs the field ID (post id), in order to get attachments.
In the shortcode, I get the post id, then I use get_children with this id to get attachments. With your method, we have only the post content.
Emmanuel.