- This topic has 14 replies, 3 voices, and was last updated 3 years, 8 months ago by Leo.
-
AuthorPosts
-
August 4, 2020 at 9:14 am #1387152Rohan Verma
Hi, team.
1. Whenever I click to author link from the single post or from the homepage author link (view all posts by author), it just redirects to the homepage every time.
2. How can I get the same (view all posts by author) link on the single post author bio?Kindly help with it.
August 4, 2020 at 1:19 pm #1387407LeoStaffCustomer SupportHi there,
1. That’s strange. It should go to the author archive by default as seen here:
http://gpsites.co/marketer/Does it happen on the normal post loop without WP Show Posts as well?
August 5, 2020 at 7:55 am #1388371Rohan VermaYes. From everywhere. Clicking on the author link redirects to homepage.
August 5, 2020 at 8:00 am #1388373AlexanderDo you have any SEO plugins installed?
I know that Rank Math for exampel have a feature where author link redirect to homepage.August 5, 2020 at 8:01 am #1388378Rohan VermaUsing Yoast.
August 5, 2020 at 8:22 am #1388402LeoStaffCustomer SupportCan you try disabling it?
August 5, 2020 at 8:46 am #1388426Rohan VermaNow, after deactivating and reactivating all disabled plugins, it seems that my author URL (admin) is working fine.
But other assigned author link opens the homepage even after deactivating yoast and caching.
August 5, 2020 at 8:49 am #1388436Rohan VermaStill, I have deactivated Yoast and caching so that you guys can check.
One thing I should mention that there is a snippet code I’m using that’s related to date and author image on a single post. I’m giving the code below. Take a look if something is conflicting.
add_filter( ‘generate_post_author_output’, function() {
return sprintf( ‘ <span class=”byline”>%1$s</span>’,
sprintf( ‘<span class=”author vcard” itemtype=”http://schema.org/Person” itemscope=”itemscope” itemprop=”author”>%4$s<span class=”author-name” itemprop=”name”>%3$s</span></span>’,
esc_url( get_author_posts_url( get_the_author_meta( ‘ID’ ) ) ),
esc_attr( sprintf( __( ‘View all posts by %s’, ‘generatepress’ ), get_the_author() ) ),
esc_html( get_the_author() ),
get_avatar( get_the_author_meta( ‘ID’ ) )
)
);
} );add_filter( ‘generate_header_entry_meta_items’, function() {
return array(
‘author’,
‘comments-link’,
‘date’,
);
} );August 5, 2020 at 9:08 am #1388455LeoStaffCustomer SupportCan you disable all plugins and custom functions to eliminate any conflicts first?
August 5, 2020 at 10:10 am #1388508Rohan VermaDisabled all plugins except for GP Premium and WPSP. Disabled all PHP codes and custom CSS.
Now, kindly help on it. Issue remains.
August 5, 2020 at 10:15 am #1388512LeoStaffCustomer SupportI actually just tested it and everything seems to work on my end:
https://www.screencast.com/t/uYOsJj4NnibVWhat isn’t working for you?
August 5, 2020 at 11:53 am #1388623Rohan VermaBut I think after adding the custom css codes, the same issue appears again.
Can you kindly check the css codes which is causing the conflict?
Because there are so many individual codes for styling. So, I shouldn’t remove all.
August 5, 2020 at 5:48 pm #1388857LeoStaffCustomer SupportCSS would not cause issues like this.
Are you saying the function here is causing the issue?
https://generatepress.com/forums/topic/author-link-redirects-to-homepage/#post-1388436What was that function for?
August 6, 2020 at 2:51 am #1389195Rohan VermaI have managed to fix the issue. Thanks for suggesting that SEO plugin part.
Author Archive was turned off by default.
August 6, 2020 at 8:44 am #1389695LeoStaffCustomer SupportNo problem 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.