Navigation überspringen

[Gelöst] Display an icon when a new post is published.

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

Problem:
How to display a badge or notification that there is new content on the site published or modified within the past, say, 48 hours?

Solution:
You would create a View that queries the kinds of content you want to check the publish/modify date for and outputs the badge or message you want to display, e.g. "Fresh content!". You can probably disable the wrapper div for a simple View such as this.

Then you need to add some code that uses the Views API hook wpv_filter_query to modify the query so that only posts modified within the target period are returned. An example of such code is given below: https://toolset.com/forums/topic/display-an-icon-when-a-new-post-is-published/#post-1224497

This support ticket is created vor 5 Jahren, 9 Monaten. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Dieses Thema enthält 15 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von larryL vor 5 Jahren, 8 Monaten.

Assistiert von: Nigel.

Author
Artikel
#1229502

My issue is resolved now. Thank you!