Display-posts shortcode not working

  • Unknown's avatar

    I recently addded a private page which includes a display post shortcode, but try as I might it will not display anything. Checking other pages I notice that several that use the display posts shortcode to list posts as an archive now have no images (see https://rosemarycottageclinic.wordpress.com/west-sussex-history-of-medicine-society-archive/ and https://rosemarycottageclinic.wordpress.com/all-my-recipes/ ). However, it is still working as expected in the sidebar widget where it displays three recipes with pictures. Any ideas?

    The blog I need help with is: (visible only to logged in users)

  • Hi there,

    The content of this shortcode is cached, so it can take up to an hour after adding or modifying the shortcode, or after adding new content that qualifies for the shortcode, for the shortcode to update. That might explain what’s happening on the private page – you’re checking it when it hasn’t updated yet. If you don’t think that’s the case, please give the title of the private page so I know which one to check.

    As for the images, go to My Site ->Customize ->Content Options. The box right at the bottom to display featured images on pages is unchecked. That also prevents featured images from displaying for the posts embedded via the shortcode. If you enable that, the images will appear.

    I’m not sure if this is how it’s supposed to work or not, so I’m checking with our themes team to confirm.

  • I’ve had confirmation from our themes team, and that setting is supposed to also affect posts displayed on a page via the shortcode.

  • The topic ‘Display-posts shortcode not working’ is closed to new replies.