[Support request] want to remove Author’s bio from side bar in the rest of pages except homepage

Home Forums Support [Support request] want to remove Author’s bio from side bar in the rest of pages except homepage

Home Forums Support want to remove Author’s bio from side bar in the rest of pages except homepage

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #2164574
    Naveen

    Hi, If you go to my site, you can see an author’s bio including display picture on the sidebar on each and every page.

    However, I want it to display only on my homepage on the sidebar.

    on rest of the pages, I want to remove the author’s bio from sidebar. However, I want a separate author’s bio below each blog post, instead of sidebar (in desktop and as well as in mobile)

    How to do that? kindly help me with it.

    #2164640
    David
    Staff
    Customer Support

    Hi there,

    the simplest option is to hide it with some CSS:

    body:not(.home) #block-60 {
        display: none;
    }
    #2165367
    Naveen

    Hi, i placed the code provided by you in the additional CSS.

    I exactly placed it below the existing CSS as mentioned below:

    /* format name field in the comment section */

    .comment-form #author {
    color: var(–contrast);
    background-color: var(–base-2);
    border-color: var(–base);
    border: 1px solid;
    border-radius: 0;
    padding: 10px 15px;
    max-width: 100%;
    }
    /* end of name field code */

    /* hiding author’s bio from rest of the pages except homepage */

    body:not(.home) #block-60 {
    display: none;
    }

    /* end of author’s bio code */

    However, after I placed /* hiding author’s bio from rest of the pages except homepage */
    code, the code of /* format name field in the comment section */
    is not working.

    Why is that?

    And also even after hiding author’s bio from other pages, still it showing in a few of pages. I have provided you the URL below. Kindly look into it and help me with it.

    Thank you.

    #2165409
    Fernando
    Customer Support

    Hi Naveen,

    There’s a syntax error in your CSS code looking at your site from my end.

    Specifically, there’s a missing } before body:not and an extra } after display:none; }

    Kindly make sure you’re copying the codes as is.

    In any case, another approach to achieve this is to Create a Block Element for your Author Bio and hook it before_right_sidebar. Through this, you can set the display rule to appear only on your homepage.

    For example: https://www.youtube.com/watch?v=1E7zFl678kg

    Then, create another Block Element for the Author Bio that would appear only for Posts.

    Example: https://www.youtube.com/watch?v=4x6CjGOyagc

    For further reference: https://docs.generatepress.com/article/block-element-overview/

    Also see: https://docs.generatepress.com/article/hooks-visual-guide/

    Hope this helps! 🙂

    #2165591
    Naveen

    Hi, as per your recommendation, with the help of the youtube video you mentioned, I created a separate “Author Bio” only for blog posts after content.

    I followed exactly as per the youtube tutorial. However, my social links are not being displayed and the author’s description is not being displayed in my author’s bio.

    Once Can you please go through my blog posts and check it?

    Also, If you have any separate code to add extra fields to WordPress user profile, can you please provide it?

    #2165793
    David
    Staff
    Customer Support

    The YT video has this link in ht description for adding more social fields:

    https://www.lockedownseo.com/add-new-fields-to-wordpress-user-profiles/

    How did you add the description to the block element ?

    #2165838
    Naveen

    Ofcourse, I have gone through the same URL: https://www.lockedownseo.com/add-new-fields-to-wordpress-user-profiles/ and with the help code snippets, I placed the code. As a result, the extra fields were added. However, When I added the links of my social media accounts in those fields and saved it, those fields are turning blank and taking those links.

    I don’t know what’s the issue. That’s why I asked you to provide me any other code to add extra fields that would work.

    Regarding, description, I tried 2 ways. I wrote the description within the block element and published, it didn’t work. And another way, I left the author description block empty, as I already wrote description in my profile page. Both ways it didn’t work.

    What is causing issue?

    Kindly help me with it.

    #2165870
    David
    Staff
    Customer Support

    I am sorry but i don’t have any alternative code. The code provided in the URL i have used on many sites and it works correctly. There must be some other code or plugin on your site that is affecting that,

    The Description – you simply need to add a GP Dynamic Content Block:

    https://docs.generatepress.com/article/dynamic-blocks/#dynamic-content

    And select the Author Description.

    #2166961
    Naveen

    Hi, I followed as mentioned in the video as well as the guide. Still, it didn’t work. However, I tried my own way by writing the author description manually instead of choosing “Author Meta” then it worked. I also did same for Social Links as well. When I choose social links from the dynamic options it is not taking the links.

    So, I manually inserted the social links. Then it worked.

    I don’t know what’s the issue. But fortunately it worked when I used my own brain.

    Thank you. For your support by the way.

    Best wishes!

    #2166980
    David
    Staff
    Customer Support

    Glad to hear you found a solution!

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