• Resolved Dan O

    (@indypldano)


    I'm developing (not available outside our domain, hence no 'Link to the page...') a site alerts system for a library (scheduled closings, unscheduled closings, etc.) with WordPress default scheduled pages and a page/post expiration plugin. I have each site alert in a Page and each page is inserted via Insert Pages (the equivalent of the shortcode: [insert page='alert-closing-someEvent' display='content']) in a widget area at the top of the page (above the site logo and navigation). I have a custom widget area in a custom child theme based on 'twentytwenty'; the widget area is inserted via functions.php + header.php. Since the pages are Drafts and set to be published on a schedule, I thought the content of each should only appear while published. But each of these displays to the public even while scheduled to be published and after the Page publication expires. The only way I've been able to hide each included page is to set it to Private, but this doesn't work with scheduled and expiring Pages. Could a caching system interfere with Insert Pages? Is there a cookie that I need to exclude from caching, so that drafts will be hidden (vs always displaying)? Please let me know if you have any ideas on how to get this working.

Viewing 1 replies (of 1 total)
  • Thread Starter Dan O

    (@indypldano)

    The plugin solution had too many obstacles, so I made a function (in functions.php) to pull a Post category of ‘alerts’ into a top section of the page (in header.php).

Viewing 1 replies (of 1 total)
  • The topic ‘insert page if status published’ is closed to new replies.