Forums

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

  1. 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/

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

Reply

You must log in to post.

About this Plugin

About this Topic