At the moment all news items are visible on the home page. There is no mechanic or feature in place to remove news items from the home page. With this issue I suggest to automatically remove news items that have been published 4 weeks. We can do this automatically by sorting and filtering the news items based on the publication date.
According to ChatGPT it can be achieved through:
{% assign event_date = "2024-01-01" | date: "%s" %}
{% assign current_date = "now" | date: "%s" %}
{% assign seconds_since = current_date | minus: event_date %}
{% assign weeks_since = seconds_since | divided_by: 604800 %} {# 604800 seconds in a week #}
{{ weeks_since }} weeks ago
We should also include a manual field and/or toggle to hide a page from the home page manually.
At the moment all news items are visible on the home page. There is no mechanic or feature in place to remove news items from the home page. With this issue I suggest to automatically remove news items that have been published 4 weeks. We can do this automatically by sorting and filtering the news items based on the publication date.
According to ChatGPT it can be achieved through:
{% assign event_date = "2024-01-01" | date: "%s" %} {% assign current_date = "now" | date: "%s" %} {% assign seconds_since = current_date | minus: event_date %} {% assign weeks_since = seconds_since | divided_by: 604800 %} {# 604800 seconds in a week #} {{ weeks_since }} weeks agoWe should also include a manual field and/or toggle to hide a page from the home page manually.