• Resolved votejimmartin

    (@votejimmartin)


    After spending a couple hours debugging, I found the problem arises from line 198 in ultimate-post-widget.php in that the WP_Query object queries for ‘post_status’=array(‘published’, ‘private’). However, items in the Media Library are of ‘post_type’=’attachment’ and have no ‘post_status’ because they are children (attachments) of ‘post_type’=’post’. In order to display ‘post_type’=’attachment’ (and all other children with no ‘post_type’ defined), it is best if the ‘post_type’ of the parent is inherited such that the children of all post types will be shown if their parent is published or private (and hidden in all other cases). The fix to this bug is to add ‘post_status’ => array(‘publish’, ‘private’, ‘inherit’) to the array defined on lines 179-187 in ultimate-post-widget.php.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Attachments don’t show’ is closed to new replies.