Tell us what you are trying to do?
I wanted to make a link or button on each post page to link to a page listing the Author's other posts. I even tried making a view on the post itself to list their other posts, but there doesn't seem to be an option for post author. Just page author.
Is there any documentation that you are following?
https://toolset.com/documentation/user-guides/filtering-views-query-by-author/?utm_source=plugin&utm_medium=gui&utm_campaign=views
Is there a similar example that we can see?
What is the link to your site?
Hi,
Thank you for contacting us and I'd be happy to assist.
To show a link to the current post's author archive, you can add a "Single Field" block and select it to show the "Author Posts Link".
( screenshot: author-post-link-example.png )
Note: If you're not using the blocks editor, you can use the shortcode "wpv-post-author".
( ref: https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-author )
Example:
[wpv-post-author format="link"]
As for using a view to show the current post author's other posts (on the single post page), you'll select the option "Post author is the author of the page where this View is shown".
( https://toolset.com/documentation/user-guides/views/filtering-views-query-by-author/#post-author-is-the-author-of-the-page-where-this-view-is-shown )
In this context "page" refers to the current "single post page".
I hope this helps and please let me know if you need any further assistance around this.
regards,
Waqar
wpv-post-author format="link" will just create a link to a blank page. Could a php be missing from my theme? I had a similar issue with the archives.php.
I try to make a toolset archive with a "standard archive" of "author archive", but it creates a link loop. every link listed is of the standard post on the site and clicking on them links back to the list of authors. I am not using standard posts, so this has been confusing me for a while and the title links don't even link to the post, it links back to the author archive template.
"Post author is the author of the page where this View is shown" on the post page did work, but I would still like to know what I can do about the link.
Thanks for the update.
To troubleshoot this further, I'll need to see how the archives are set up on your website's backend.
Can you please share temporary admin login details along with the link to a page where this post author archive link can be seen?
Note: Your next reply will be private and please make a complete backup copy, before sharing the access details.
I have read this issue in another support post but the answer was omitted. The problem was that the default author archive does not include custom posts and therefore toolset's author archive can not include custom posts.
I had to add a little bit of code to the functions.php in the wp-includes folder. Where people, group, event and service are my custom post types that I needed to add to post (which is the default post type)
function post_types_author_archives($query) {
// Add post type to author archives
// Add your own Post types in single quotes before 'post'
if ( $query->is_author ) {
$query->set( 'post_type', array('people','groups','event','service','post') );
// Remove the action after it's run
remove_action( 'pre_get_posts', 'post_types_author_archives' );
}
}
add_action( 'pre_get_posts', 'post_types_author_archives' );