Skip Navigation

[Resuelto] New custom post from the last 7 days

This support ticket is created hace 5 años. 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Etiquetado: 

Este tema contiene 35 respuestas, tiene 2 mensajes.

Última actualización por FelipeP5703 hace 5 años.

Asistido por: Shane.

Autor
Mensajes
#1375407

Tell us what you are trying to do?

I created a View to show the latest posts from 7 days ago until now, but it is not showing the newest posts. Here is a video explaining: enlace oculto

Also, I need someone in the support team who is in my time zone or close to it. GMT -3 since I have gone live with the site.

Thank you!

#1375831

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Felipe,

Thank you for getting in touch.

Would you mind allowing me to have admin access to the site so that I can check on the view for you ?

The private fields will be enabled for your next response.

Thanks,
Shane

#1375833

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Private fields

#1375939

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Felipe,

Ok so I understand the issue now.

Actually the view filter is correct, Based on your filter query it is giving the correct results.

So it would read that you wont the posts that were published exactly 7 days ago, so your most recent one wont show up until its at least 7 days old.

Is it that you want to show your latest 6 posts ?

Please let me know.

Thanks,
Shane

#1375969

I want to show all new custom posts from today until 7 days ago.

#1376369

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Screenshot 2019-11-05 at 9.55.40 AM.png
Screenshot 2019-11-05 at 9.55.34 AM.png
Screenshot 2019-11-05 at 9.56.00 AM.png

Hi Felipe,

This is quite the a strange issue as I've adjusted the filter to show the dates between today and the last 7 days . See Screenshot.

Secondly I enabled the debug data for the view so that I can inspect the sql query being passed to the database and what is the number of posts being returned.

As you can see from the screenshots the SQL query is correct and the number of posts to be returned is also correct.

So there might be a plugin conflict somewhere that is overwriting our view display. I would suggest temporarily disabling the non-toolset plugins and trying again.

Also please try remaking this view completely and adding the same filters as in my screenshot and let me know the results as this view could be corrupt as well.

Thanks,
Shane

#1376443

What about using PAST 1 for the week field? What does that do?

#1376457

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Felipe,

I've set the filter to the past 1 week and it is displaying the posts that were added last week.

There should be 12 posts in total and all 12 are showing.

Please check on your end and let me know.

Thanks,
Shane

#1376487

Yes it is showing correctly, so the correct way is to use Past 1 Week in order to show custom post from today until 7 days ago?

#1376601

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Felipe,

What will happen is that it will only show posts of the previous week. So if I create a post today then it won't show up until the next week.

However my solution here
https://toolset.com/forums/topic/new-custom-post-from-the-last-7-days/#post-1376369

Should work for posts between today and the past 7 days.

Thanks,
Shane

#1376681

Shane,

I followed your instruction for changing the settings to https://toolset.com/forums/topic/new-custom-post-from-the-last-7-days/#post-1376369

But it is showing everyone.

So I created a new View, since this might be bugged and I put underneath the other one for comparison and it still showing everyone, here is a screenshot: enlace oculto and here is the setting screenshot: enlace oculto

Also everytime I view the page, there is a new window that pops up with view debugging information, how do I turn it off?

#1376723

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Felipe,

Since creating a new view didn't resolve the issue.

I would like if you temporarily deactivate all the non-toolset plugins to ensure that this isn't being caused by a plugin conflict.

The reason is that from the screenshots in the debug data you can see the sql query is correct as well as the number of items returned is correct but the view is listing out everything.

Once you have done this please let me know.

The debug information can be turned off by going to Toolset -> Settings -> Frontend and scroll to the views debug section.

Please let me know.

Thanks,
Shane

#1376763

Hey Shane, I deactivated all the plugin and still did not work... here: enlace oculto

#1377217

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Felipe,

Thanks for running this quick test for me.

I'm having a further look at the issue for you.

#1377237

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Felipe,

Ok so I figured that the between weeks filter is not inclusive. This means that if you have posts published in Week 1, 2 , 3 ,4 and you created a query for Between week 1 and week 4. You will only get posts published in week 2 and 3.

However I've added a filter that is explicit to the days
enlace oculto

This should work perfectly for your case as it displays posts that were created today and up to 7 days ago. If you look at the filter on the view you will see what i've done.

Please let me know if this helps.

Thanks,
Shane