Skip Navigation

[Resuelto] 'read more' at author page view loads non-relevant posts

This support ticket is created hace 6 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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Etiquetado: ,

Este tema contiene 3 respuestas, tiene 2 mensajes.

Última actualización por Luo Yang hace 6 años.

Asistido por: Luo Yang.

Autor
Mensajes
#1152612

I've got a layout at author page, that shows view with this author posts. When clicking 'read more', I get not just posts of different authors, but even drafts. Completely weird... Any ideas why this could happen?

#1152906

Hello,

I assume we are talking about the Author archive page, since it is a wordpress archive page, I suggest you follow our document to setup Views wordpress archive to style/format it:
https://toolset.com/documentation/user-guides/creating-wordpress-custom-post-archives/

You can also setup pagination in the Views wordpress archive:
https://toolset.com/documentation/user-guides/custom-pagination-for-wordpress-archives/

#1154748

It's a bit tricky:

I've got a layout for Author archive page. It contains following code:

[wpv-view name="author-latest-posts" authorid="[queried_object_id]"]

There is a good reason I don't use standard loop block from Layouts...

[queried_object_id] shortcode obviously generates current author id

This view looks like this: enlace oculto

These are ajax params when more posts are loaded:
view_number: 118-CATTRbabe57c9b82643e96dfb70058b68c0cb
page: 2
sort[wpv_sort_orderby]:
sort[wpv_sort_order]:
sort[wpv_sort_orderby_as]:
sort[wpv_sort_orderby_second]:
sort[wpv_sort_order_second]:
attributes[authorid]: 5
environment[archive][type]: native
environment[archive][name]: author
environment[archive][data][author_name]: chenm
expect: full
action: wpv_get_view_query_results
id: 118
wpv_view_widget_id: 0

I use the same trick at category pages and it works fine. But at author page, it returns junk.

#1154983

It is not recommended to use normal post view with AJAX pagination in a archive page, it will conduct unexpected result.

And in your case, you just need to use Views WordPress archive to style/format the author archive page, you will be able to setup the AJAX pagination, search form and sorting in it too.