Problem Description:

The post loads with the title, sidebar/content and link, etc, but the slider/video/image is missing or blank.

This is caused by missing attachments on the post

Answer:

Portfolio and Album posts look for attachments on the post in order to build a set of images to display in this post’s special template. If you created a portfolio, album or gallery post and selected images from your media library rather than uploading them, they do not actually get attached to the post and so cannot be found by WordPress when it builds the page. This only works if you insert the images into the post, which defeats the purpose the post’s template is trying to achieve.

Refer to your theme’s documentation article for how to correctly create image posts using attachments. In short, the process goes like this:

  1. Create a new portfolio, gallery or album post
  2. Enter only a short amount of text in the post area for portfolios, or leave it blank for Albums
  3. Click Add Media at the top and upload the images you want displayed in this post’s gallery or slider.
  4. Edit the images Title and Alt text on the right side when complete
  5. Click Featured Image on the left and choose one to use as the featured image then click Set Featured Image button on the bottom right to close the Media Library.
  6. Choose any available options for the post in the posts Options panel, select a Category, then Publish.

Fixing Existing Posts: Uploading Attachments

  1. Head into the post index for the post types you need to fix
  2. Click a post to edit it
  3. Click Add Media and select Uploaded to This Post from the “All Media Items” drop-down
    • uploadedtopost
    • This will show you any images that are attached to this post. If it returns nothing, your post has no attachments.
  4. Click Select Files to upload the images for this post. This will attach them to the post and create your slider/image set.
  5. Click Featured Image on the left and select the featured image from the set you uploaded, then click Set Featured Image at bottom -right
  6. Click Update

If you do not want to re-upload the images, you can manually attach existing images to posts using the following method.

Fixing Existing Posts By Attaching Images

  1. Click on Media and ensure the list view is enabled by clicking the first icon in the toolbar below the Media Library heading.
  2. Locate the images that belong to the problem post and see if they are attached to a different post, or unattached.
    • attach_detach
  3. Click Attach/Detach to choose the post the image belongs to
  4. Repeat for each orphaned image. Once complete, reload your posts and the images should now appear as expected.