Skip Navigation

[Résolu] 'read more' at author page view loads non-relevant posts

This support ticket is created Il y a 6 années. 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.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

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)

Marqué : ,

Ce sujet contient 3 réponses, a 2 voix.

Dernière mise à jour par Luo Yang Il y a 6 années.

Assisté par: Luo Yang.

Auteur
Publications
#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: lien caché

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.