[wp-trac] [WordPress Trac] #28219: add_media 'Uploaded to this post' listing unattached files when post type does not support 'thumbnail'

WordPress Trac noreply at wordpress.org
Fri Sep 19 16:43:05 UTC 2014


#28219: add_media 'Uploaded to this post' listing unattached files when post type
does not support 'thumbnail'
--------------------------+---------------------------------------
 Reporter:  bobbingwide   |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Media         |     Version:  3.9
 Severity:  minor         |  Resolution:
 Keywords:                |     Focuses:  administration, template
--------------------------+---------------------------------------
Changes (by momekh):

 * focuses:  administration => administration, template


Comment:

 This may be related:

 I used twentyfourteen's script as follows:


 {{{
 <p class="small byline">
   Parent Post (for this attachment):
   <span class="parent-post-link">
    <a href="<?php echo get_permalink( $post->post_parent ); ?>"
 rel="gallery">
         <?php echo get_the_title( $post->post_parent ); ?>
    </a>
   </span>
 </p>
 }}}

 I have thumbnail support enabled.

 Now, when I added the function in the theme, all previous gallery
 attachments are showing post->parent as 0 (linking back to the original
 attachment).

 But when I add new post (post-format: gallery), and add a few images, the
 above code correctly links to the attachment parent.

 Digging around, the two issues above may be inter-related???

 I am on WP 4.0 btw.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28219#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list