- This topic has 15 replies, 4 voices, and was last updated 1 year, 2 months ago by
David.
-
AuthorPosts
-
July 12, 2022 at 5:14 pm #2281025
Chintan
Hi
I want to remove pagination from my author archive page and have it appear like this: https://www.onthemap.com/author/chintan/. For all of my authors. Can you please tell me how this is possible without the use of a plugin on GeneratePress?
Thanks,
ChintanJuly 12, 2022 at 5:36 pm #2281032Fernando Customer Support
Hi Chitan,
At the very least, you’ll need the free GenerateBlocks plugin to achieve this layout. Without it, the amount of custom code to achieve such a page would be out of our scope of support.
Hope this clarifies.
July 12, 2022 at 5:39 pm #2281033Chintan
Hi Fernando,
Yep, GenerateBlocks is already with me. Can you help me with its access?
July 12, 2022 at 5:59 pm #2281039Fernando Customer Support
May we know what access you’re referring to?
With regards to the design of Author Archive page, we can first start from the top.
So, here are the first steps you can take.
1. Create a Block Element – Page Hero. Reference to Page Heros: https://docs.generatepress.com/article/block-element-page-hero/
2. Set the Display rule location to Author Archives.
3. Disable the title, featured image, and primary post meta.
4. Create a setup like this: https://share.getcloudapp.com/geuREZ1W
5. Enable dynamic data for the GB Image Block, and set the source to Author Avatar.
6. Add padding, border radius, and modify the width and height of the image to your liking.
7. Enable dynamic date for the GB Headline Block as well. Set the content source to Author name.
8. Add social icons. You can refer to this video for guidance with regards to this: https://www.youtube.com/watch?t=100&v=yAleVWQi5EA&feature=youtu.be
9. Modify the alignment of the Blocks to your preference.Let us know once you’ve made these changes, and we’ll proceed with the next steps.
July 13, 2022 at 4:51 am #2281415Chintan
Hi
I managed to do this. Please tell me the next steps.
I want to remove pagination that appears in the author archives and have custom content appear there. I hope that’s what the next steps will help me do.
July 13, 2022 at 6:01 am #2281465David
StaffCustomer SupportHi there,
are you the only author on that site ?
July 13, 2022 at 7:08 am #2281518Chintan
Hi,
Nope there are multiple authors
July 13, 2022 at 11:57 am #2281907Ying
StaffCustomer SupportHi Chintan,
Do you want to remove all the author posts or just want to remove the pagination?
July 13, 2022 at 2:47 pm #2282015Chintan
Hi Ying,
So I have created the author page and I want the archives to appear exactly like it. I have shared it in the private information field. Thank you.
July 13, 2022 at 3:41 pm #2282037Ying
StaffCustomer SupportTo be clear, you’ve created static author pages for each author?
If that’s the case, try to add this PHP snippet:
add_filter('request', function( array $query_vars ) { if ( is_admin() ) { return $query_vars; } if ( isset( $query_vars['author_name'] ) ) { $pagename = $query_vars['author_name']; $query_vars = array( 'pagename' => "$pagename" ); } return $query_vars; } );
Adding PHP: https://docs.generatepress.com/article/adding-php/
Makes sure your static author page slug matches the author slug.
For example, for author
chintanzalani
, the static author page slug should bechintanzalani
as well.Let me know if that works!
July 13, 2022 at 4:22 pm #2282052Chintan
Thanks so much. That worked 🙂
From an SEO standpoint, I want to know what will happen to the paginated author archives. For instance, when I am right now trying to put a page number in my archive (the link in the private info field), it still shows the same static page. So are the paginated archives not like a 301 redirect?
July 14, 2022 at 11:45 am #2282894Ying
StaffCustomer SupportIt looks like you are using SEO plugin.
You should be able to disable author achieve, for example, here’s the guide from Yoast SEO plugin:
https://yoast.com/help/how-to-noindex-individual-author-pages/July 15, 2022 at 4:26 am #2283424Chintan
Thanks much. I want to actually have the archive paginated pages be 301 redirected to the main static author page. I can do this with the SEO plugin. But is there a more efficient way to do it using PHP code? Again thank you so much for all the help 🙂
July 15, 2022 at 6:43 am #2283503David
StaffCustomer SupportHi there,
if you can do it with the SEO plugin then i would suggest you use that, they would have a far better understanding on how to do it correctly.
July 15, 2022 at 6:50 am #2283513Chintan
Okay thank you 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.