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
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:
- Create a new portfolio, gallery or album post
- Enter only a short amount of text in the post area for portfolios, or leave it blank for Albums
- Click Add Media at the top and upload the images you want displayed in this post’s gallery or slider.
- Edit the images Title and Alt text on the right side when complete
- Click Set Featured Image button on the bottom right to close the Media Library. on the left and choose one to use as the featured image then click
- Choose any available options for the post in the posts Options panel, select a Category, then Publish.
Fixing Existing Posts: Uploading Attachments
- Head into the post index for the post types you need to fix
- Click a post to edit it
- Click Add Media and select Uploaded to This Post from the “All Media Items” drop-down
- Click Select Files to upload the images for this post. This will attach them to the post and create your slider/image set.
- See How to Manually Order Attachment Images for Galleries, Portfolios and Albums for tips on setting the order
- Click Set Featured Image at bottom -right on the left and select the featured image from the set you uploaded, then click
- 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
- Click on Media and ensure the list view is enabled by clicking the first icon in the toolbar below the Media Library heading.
- Locate the images that belong to the problem post and see if they are attached to a different post, or unattached.
- Click Attach/Detach to choose the post the image belongs to
- Repeat for each orphaned image. Once complete, reload your posts and the images should now appear as expected.