Skip Navigation

[Resolved] Display multiple lists of CPT on author archive

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.

This thread is resolved. Here is a description of the problem and solution.

Problem:
Create custom links of authors links, for example:
/page/?author_id=13

Solution:
You can use below shortcode to get the author ID of current post:
[wpv-post-author format="meta" meta="ID"]

<a href='[wpv-post-url id="123"]?author_id=[wpv-post-author format="meta" meta="ID"]'>[wpv-post-author format="meta" meta="display_name"]</a>

Relevant Documentation:
https://toolset.com/documentation/views-shortcodes/#wpv-post-url
https://toolset.com/documentation/views-shortcodes/#wpv-post-author

This support ticket is created 8 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

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)

This topic contains 8 replies, has 2 voices.

Last updated by augustoD 8 years, 1 month ago.

Assisted by: Luo Yang.

Author
Posts
#373241

I have 3 CPT and i would like to know if it is possible to list them on the registered user profile/author page.

I want that 'not registered users' AND 'registered user' can see other users created CPT. on theirs profile page listed by each CPT under its title <h3>.

I found this thread from 2014, but don't know if feature is still not available https://toolset.com/forums/topic/author-archives-that-list-custom-post-types/

Thanks.

#373278

Dear augusto,

What is the user profile/author page?
The thread you mentioned above:
https://toolset.com/forums/topic/author-archives-that-list-custom-post-types/
Which is a author archive page, this feature is still unavailable, Views can not modify the query of archive page, can only format the output, see our document:
https://toolset.com/documentation/user-guides/normal-vs-archive-views/

In your case, I suggest you create a wordpress page to replace the author archive page, in this page, create three views, use each view to list posts of post types

Hope it help

#373504

Thanks for the reply luoy

For user profile/author page I mean the author page for each WordPress user, it's a multiple user website.

#373648

I assume we are talking about author archive page, as I mentioned above, Views can not modify the query of archive page, you will need to create a wordpress page to replace the author archive page:
create three views, use each view to list posts of post types
for example, there three custom post types in your website:
CPT1, CPT2, CPT3,
1) You can setup three views to list posts of each custom post type, filter with Post author is set by URL parameter "author_id":
https://toolset.com/documentation/user-guides/filtering-views-query-by-author/
section "Post author is set by URL parameter"
2) Then put all three view into a page
3) then setup links to pass author IDS to above page, like this:
/page/?author_id=13

#374112

So i have to create urls that show username linked to this special page with the same user on the url /page/?author_id=13 OR /page/nickname.

Will I be able to create custom links of CPT authors in listings and CPT views?

#374179

Yes, it is very easy to setup such kind of link with Views shortcode [wpv-post-author], for example:
You can use below shortcode to get the author ID of current post:
[wpv-post-author format="meta" meta="ID"]

More help:
https://toolset.com/documentation/views-shortcodes/#wpv-post-author
Display details for the author of the current post.

#374309

Will that work on a listing loop?

#374508

For example, you are using a page to display all three views, the page ID is 123, then in the view's loops, you can setup author link to the page 123, as below:

<a href='[wpv-post-url id="123"]?author_id=[wpv-post-author format="meta" meta="ID"]'>[wpv-post-author format="meta" meta="display_name"]</a>

More help:
https://toolset.com/documentation/views-shortcodes/#wpv-post-url
https://toolset.com/documentation/views-shortcodes/#wpv-post-author

#375573

Perfect, thanks for the support.

The forum ‘Types Community Support’ is closed to new topics and replies.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.