WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Attachments] post_parent doesn't work? (1 post)

  1. TakeoK
    Member
    Posted 2 years ago #

    Perhaps I'm not understanding the post_parent feature of the Attachments plugin. I can't find any documentation. My assumption is that using the post_parent option means that any attachments added via the Attachments plugin interface would also be added as standard WordPress attachments... and would therefore show up in the "Gallery" tab of the media library for a post and be query-able via standard WordPress functions queries and functions like:

    $args = array(
    	'post_type' => 'attachment',
    	'post_parent' => $post->ID,
    );
    $attachments = get_posts($args);
    etc...

    and

    wp_get_attachment_image()

    That does not seem to be the case however. I can't seem to grab any attachments using standard WordPress queries and functions. The only way I can get the plugin to work is with it's native attachments_get_attachments() function. Am I just missing something? Or not understanding the post_parent feature of the plugin? By the way, this is the free version and I'm using it with a Custom Post Type... if that matters.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.