Site logo

[Resolved] How to point a Dynamic Text Type (for Author) to point to a Page of our choosing

Home Forums Support [Resolved] How to point a Dynamic Text Type (for Author) to point to a Page of our choosing

Home Forums Support How to point a Dynamic Text Type (for Author) to point to a Page of our choosing

Viewing 15 posts - 1 through 15 (of 22 total)
  • Author
    Posts
  • #2534912
    Mark

    Hi there,

    How can this be done? I can easily turn to point to Author Archives in the dropdown, but how can I manually put a link over the author to point to an individual Bio page that is nothing to do with Author Archives?

    I have more than one author, so this will be pointing to different static pages (not author archives)

    Note that I am doing this in a “Page Hero” Element. I will supply private info below.

    Many thanks

    #2534913
    Fernando
    Customer Support

    Hi Mark,

    For one, you can still use the default Author Archive, just use a Block Element – Loop Template to override the content: https://docs.generatepress.com/article/block-element-loop-template/

    You can store the author’s description and other stuff as a custom author meta through ACF. ACF reference: https://www.advancedcustomfields.com/resources/getting-started-with-acf/

    You can then retrieve these author meta through GenerateBlocks.

    The alternative to custom fields would be to create a Loop Template for each Author archive.

    #2534935
    Mark

    Hi Fernando.

    I definitely do not want to use archives. So in the URLs in private I posted previously, I want to click the author name and it go to that author’s bio URL. We have more than one author, so it needs to be dynamic, so that by clicking on the author’s name, it goes to that author’s bio page (not archives).

    I’m not sure I can do it with this https://docs.generatepress.com/article/block-element-loop-template/ ? I read it and didn;t really understand.

    Thanks

    #2534936
    Fernando
    Customer Support

    Are you creating the “static” pages for each author manually right now or do you want to do that dynamically as well?

    #2534950
    Mark

    I’m not sure I understand the question (sorry, I’m probably being a bit slow!)

    All posts and a lot of pages will have an author assigned to them and they need to go into the Page Hero. I’ve managed to work out how to get the image to dynamically populate depending on who the author of the post is.

    What I now need to do is get the name of the author (which is successfully dynamically populating) to be a hyperlink to an author bio page (there is only one URL per author). This is the problem I am having, adding a link to the author bio page for that dynamically added author.

    It seems I can only point to several options, including Author Archives (which is no good) and Author Meta. If I could add HTML (and thus the name of the author and link) to wherever Author Meta is, I think that would work.

    UPDATE: I also tried adding into the WP User “Biographical Info” section. That does work, but then when I do that I have to select the “Dynamic Content” block. If I do that I don’t seem to be able to control the font size etc, and it looks terrible! If you check the link below in the private area, you’ll see what I mean (and it clearly illustrates what I am trying to achieve)

    Cheers

    #2534953
    Fernando
    Customer Support

    Well, I believe the easiest and more future-proof way to do this is through a Block Element – Loop Template.

    Basically, you create a Loop Template and add stuff there like the Author Last name for instance: https://share.getcloudapp.com/4gu46v6b

    You can also add other author meta data. You can check some author meta slugs here: https://developer.wordpress.org/reference/functions/get_the_author_meta/

    This basically allows you to style Author Archive Pages completely.

    You can try it first and see how it goes.

    #2534987
    Mark

    Hi Fernando,

    Where do I enter the details of the Author Meta? I added a video (in the private area below) showing the successful population of the author (but doesn’t link anywhere). It needs to link to the author bio page.

    So I thought about adding user_description in the field from the list you provided https://developer.wordpress.org/reference/functions/get_the_author_meta/ but I then get nothing. You’ll see in the video in the
    Biographical Info section of the WP User this doesn’t show. I tried a few other parameters and still nothing showed. I think I set it all up as per the image you shared: https://share.getcloudapp.com/4gu46v6b

    Thanks

    #2534989
    Fernando
    Customer Support

    I meant to link the Author text in your Page Hero to the Author Archive page, and then use a Loop Template to alter the Author Archive page.

    In your Loop Template, that’s where you add Dynamic data as shown in my previous screenshot.

    #2534996
    Mark

    I added a new Element and copied what I think is the same setup as per the screenshots you shared. I also tried user_description which I’m hoping refers to Biographical Information – either way it doesn’t work. I don’t see how adding this loop tells WordPress to fwd onto the page of my choosing.
    Again, I’m probably doing it wrong or missing something obvious.

    I recorded another video of what I set up in the private area below.

    #2534997
    Fernando
    Customer Support

    Try just description.

    #2535021
    Mark

    I’m probably still doing it wrong – I changed to description and just added to raw link of where I want the user to go in Biographical info and the user is directed to the home page just like it always does. Added a video in the private section

    #2535033
    Fernando
    Customer Support

    Can you provide admin login credentials so I can take a closer look at your setup?

    Please use the Private Information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information

    #2535037
    Mark

    No worries. Details below 🙂

    #2535049
    Fernando
    Customer Support

    The author name in your Single post is redirecting to your Homepage. Did you enable a plugin feature or do you have a code causing this?

    If so, can you disable that first?

    #2535062
    Mark

    I believe that Yoast will be doing that (totally disabling those archives). I do not want the author archives being enabled at all

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