0

slightly unusual client request. I'm using Divi and I have a nice Divi layout created for a video and text post which is ready to go. The client wants to create 365 posts (one for each day of the year and titled as such) based on this layout by just dropping in a video embed and text, and have the site essentially run with a different post display full width (ie just the post/header/footer) for each day of the year. ie - the Jan 1st post would become the site's front page on Jan 1st, and the Jan 2nd post become the front page on Jan 2nd.

The client wants to launch the site with 365 completed finished posts - all live. ie - 1st Jan, 2nd Jan ... 31st Dec. When the user goes on to the site he wants the post for 1st Jan to become the front page for 1st Jan etc and then 2nd Jan on 2nd Jan. ie - no republishing, scheduling or changing modified dates.

IT seems like there should be a simple solution, but I'm stumped. Does anyone have any great ideas? Much appreciated! (no url yet as it's still a concept on a dev platform)

8
  • If the client refuses to set the publish date, then you'll need to have them set the permalink very specifically. Trying to manually convert posts entitled "January 1" etc. would be awfully risky. If instead they use permalinks like "0101" (01 meaning January the first month, second 01 meaning the first day of that month) then you can rely on that to determine which post to display.
    – WebElaine
    Commented Jul 30, 2019 at 18:20
  • There are no date permalinks. Commented Jul 30, 2019 at 18:50
  • There will be a publish date, but the client doesn't want to reschedule or republish existing posts. Imagine 365 on this day, January 1st ... posts or a series of posts each of with a different set of birthdays on it - that's the kind of content. He wants it written up and then left to run so that the Jan 1st post/page displays AS the static front page on Jan 1st, and then at 12am Jan 2nd, the Jan 2nd post displays as the static front page. Commented Jul 30, 2019 at 18:53
  • I've looked at queries and hooks - for example this idea - wordpress.stackexchange.com/questions/324257/… - , but I cannot work out how to integrate them into a page template. Commented Jul 30, 2019 at 18:54
  • If you can't rely on published date or permalinks, all you're left with is post title. So, you'll need to create a front-page.php or similar template that shows header and footer, and in the middle, sandwich a query that searches for (current date, converted to human-readable form) as a post title. You'll need a fallback in case it can't find said post, and then a whole lot of testing, and you may need to strip whitespace so for example if the client sets the title to "January(space)(space)1" instead of "January(space)1" it still recognizes that date.
    – WebElaine
    Commented Jul 30, 2019 at 19:21

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.