Skip Navigation

[Resuelto] Display an icon when a new post is published.

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

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 hace 5 años, 7 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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)

Este tema contiene 15 respuestas, tiene 2 mensajes.

Última actualización por larryL hace 5 años, 7 meses.

Asistido por: Nigel.

Autor
Mensajes
#1229502

My issue is resolved now. Thank you!