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

  1. eskaigualker
    Posted 4 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.


  2. emmanuelg
    Plugin Author

    Posted 4 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.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • EG-Attachments
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic