WordPress.org

Ready to get started?Download WordPress

Forums

EG-Attachments
[EG-Attachments]applying filter the_content (2 posts)

  1. eskaigualker
    Member
    Posted 2 years 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/

  2. EmmanuelG
    Member
    Plugin Author

    Posted 2 years 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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic