[Resolved] Author archive page

Home Forums Support [Resolved] Author archive page

Home Forums Support Author archive page

  • This topic has 15 replies, 4 voices, and was last updated 1 month ago by David.
Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #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,
    Chintan

    #2281032
    Fernando
    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.

    #2281033
    Chintan

    Hi Fernando,

    Yep, GenerateBlocks is already with me. Can you help me with its access?

    #2281039
    Fernando
    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.

    #2281415
    Chintan

    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.

    #2281465
    David
    Staff
    Customer Support

    Hi there,

    are you the only author on that site ?

    #2281518
    Chintan

    Hi,

    Nope there are multiple authors

    #2281907
    Ying
    Staff
    Customer Support

    Hi Chintan,

    Do you want to remove all the author posts or just want to remove the pagination?

    #2282015
    Chintan

    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.

    #2282037
    Ying
    Staff
    Customer Support

    To 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 be chintanzalani as well.

    Let me know if that works!

    #2282052
    Chintan

    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?

    #2282894
    Ying
    Staff
    Customer Support

    It 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/

    #2283424
    Chintan

    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 🙂

    #2283503
    David
    Staff
    Customer Support

    Hi 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.

    #2283513
    Chintan

    Okay thank you 🙂

Viewing 15 posts - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.