[Support request] Author archives page

Home Forums Support [Support request] Author archives page

Home Forums Support Author archives page

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #973733
    Charalambos

    Hello,

    I am using a plugin that lets you create custom guest author boxes, however when it comes to the author archives page, the theme shows its own author archives page. I have been advised by the plugin support that in order to make their plugin author box design to be displayed in those kind of pages I need to edit the author.php template of my theme by adding this code: <?php echo do_shortcode(‘[[molongui_author_box]]’); ?>

    I am not using a child theme, as the gp hooks element and the code snippets plugin do the job so far. I guess you cannot do it through the hooks element, as this lets you add code in certain positions of the theme, like before head, after head etc. Can I use the code snippets plugin to insert that code into my author.php file and if yes how?

    regards

    Charalambos

    #973828
    David
    Staff
    Customer Support

    Hi there,

    try creating a new Hook Element and hook it into the position you want it to be displayed – visual guide here:

    https://docs.generatepress.com/article/hooks-visual-guide/#archives

    Then select the Author Archives in the Display Rules.

    #974630
    Charalambos

    Hello,

    Thanks, I have added their author box shortcode through the hooks element to display only in author archives page. However, now i get 2 author boxes, the plugin’s and the wordpress default. Could you please advise how to hide the wordpress default author box (title and bio)?

    regards

    Charalambos

    #974868
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    There shouldn’t be a default WordPress one. Can you link us to the page?

    #974981
    Charalambos

    Sure, here is a link to an author page below,

    https://shoepreview.com/author/nessa_star/

    #975009
    Leo
    Staff
    Customer Support

    Try this CSS:

    .author.archive .page-header {
        display: none;
    }

    Adding CSS: https://docs.generatepress.com/article/adding-css/

    Let me know 🙂

    #975027
    Charalambos

    Thanks, it works! The only issue now is that the plugin’s author box slightly exceeds to the left beyond the theme’s container width (Although, it was like that even before adding your css). Any idea how to fix that?

    #975033
    David
    Staff
    Customer Support

    Try adding this CSS:

    .archive.author .molongui-author-box {
        padding-left: 30px;
    }
    #975045
    Charalambos

    Hello, it works, however it applies everywhere there is an author box. Can i just apply this css rule only for the author archive page through the hook element i already created?

    #975052
    David
    Staff
    Customer Support

    I edited the CSS to target just the author archive.

    #975057
    Charalambos

    It works fine on desktop, however on mobile it looks messy. The line below the title and the bio have moved to the right exceeding the mobile’s container width.

    #975109
    Leo
    Staff
    Customer Support

    That’s all coming from the plugin itself:
    https://www.screencast.com/t/g6wKD8RAQ

    #975273
    Charalambos

    Hello,

    Thanks for indicating the plugin’s code. I also noted that this plugin is taking quite a lot of space when i view the page source code. It doesn’t slow down the site, but is this a bad thing in general?

    Regarding this code, from what i understand, there should be no padding on left, right, top and bottom. However it slightly exceeds to the left even beyond the theme’s container width. See how the logo, menu and posts, which all have zero padding as well, align align vertically to the left, while the author box not.

    https://shoepreview.com/author/nessa_star/

    #975503
    Tom
    Lead Developer
    Lead Developer

    That’s happening because of where the plugins HTML is located (inside the post columns container).

    Do you have any control over where the box is added? If so, we can add it to a different hook to fix the spacing issues.

    #975588
    Charalambos

    Oh i see. By the way thanks for answering even though its sunday. Your support is perfect.

    The thing is I have tried to add it in several hooks and this one – before_main_content – is the most appropriate in terms of where I really want it to be positioned. For example if I try the hook above, which is the inside_container, the padding is ok but it displays in full width ignoring the sidebar. If I try the one below which is before_content, the padding is again ok, but it displays in half width, as i am using the 2 columns blog.

    I noted that in generatepress there is an option to add a custom hook. Perhaps this can help?

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