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?
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/
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: hidden link
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.
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.