Timeline for Need to display a Jan 1st post as the site's front page on Jan 1st, and Jan 2nd post as front page on Jan 2nd etc
Current License: CC BY-SA 4.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 30, 2019 at 20:23 | comment | added | WebElaine | That would be a question for the authors of Divi. | |
Jul 30, 2019 at 20:04 | comment | added | Tom Tolkien | I have tried a query and I can get the correct blog title to be displayed as body text (using the code on this thread: wordpress.stackexchange.com/questions/53462/… ) but how do I get the query to output as a blog post via the Divi blog module? | |
Jul 30, 2019 at 19:32 | comment | added | Tom Tolkien | "If you can't rely on published date" Sorry if this wasn't clear - but I didn't say the published date cannot be relied on. The client just doesn't want to go down the route of republishing posts and cron jobs in case one glitch sends the 365 posts out of sync. Fully intend to set the Jan 1st post to published/modified on Jan 1st (probably 2018 so all the dates can be set as 'published') | |
Jul 30, 2019 at 19:21 | comment | added | WebElaine |
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.
|
|
Jul 30, 2019 at 18:54 | comment | added | Tom Tolkien | 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. | |
Jul 30, 2019 at 18:53 | comment | added | Tom Tolkien | 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. | |
Jul 30, 2019 at 18:50 | comment | added | Tom Tolkien | There are no date permalinks. | |
Jul 30, 2019 at 18:20 | comment | added | WebElaine | 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. | |
Jul 30, 2019 at 14:55 | review | First posts | |||
Jul 30, 2019 at 16:29 | |||||
Jul 30, 2019 at 14:53 | history | asked | Tom Tolkien | CC BY-SA 4.0 |