WordPress.org

Ready to get started?Download WordPress

Forums

WP Better Attachments
[resolved] Featured image being added to attachments list (4 posts)

  1. oterox
    Member
    Posted 1 year ago #

    When i add attachments for the first time it doesn't add the featured image, which is good, but when i update/publish the post the featured image is added to the list of attachents.

    The featured image shouldn't be there

    http://wordpress.org/extend/plugins/wp-better-attachments/

  2. dholloran
    Member
    Plugin Author

    Posted 1 year ago #

    Interesting, I can add something to the settings to allow you to exclude the featured image, since technically the featured image is an attachment. I had considered excluding the featured image as well as possibly adding it when a user adds the image to a pos/paget. thanks for the feedback I will add this in the next release hopefully this coming weekend.

  3. oterox
    Member
    Posted 1 year ago #

    i've modified the get_post_attachments function args to exclude it:

    $get_posts_args = array(
    	'post_type'     => 'attachment',
    	'posts_per_page'  =>  -1,
    	'post_parent'    => $post->ID,
    	'order'       => 'ASC',
    	'orderby'      => 'menu_order',
    	'exclude' => get_post_thumbnail_id($post->ID),
    );
  4. dholloran
    Member
    Plugin Author

    Posted 1 year ago #

    I have added this to the settings so there will be no issues with updating.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.