Home › Forums › Support › How to point a Dynamic Text Type (for Author) to point to a Page of our choosing
- This topic has 21 replies, 3 voices, and was last updated 3 years, 2 months ago by
David.
-
AuthorPosts
-
February 15, 2023 at 8:14 pm #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
February 15, 2023 at 8:23 pm #2534913Fernando 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.
February 15, 2023 at 8:52 pm #2534935Mark
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
February 15, 2023 at 8:54 pm #2534936Fernando Customer Support
Are you creating the “static” pages for each author manually right now or do you want to do that dynamically as well?
February 15, 2023 at 9:20 pm #2534950Mark
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
February 15, 2023 at 9:30 pm #2534953Fernando 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.
February 15, 2023 at 10:18 pm #2534987Mark
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/4gu46v6bThanks
February 15, 2023 at 10:25 pm #2534989Fernando 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.
February 15, 2023 at 10:47 pm #2534996Mark
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.
February 15, 2023 at 10:51 pm #2534997Fernando Customer Support
Try just
description.February 15, 2023 at 11:12 pm #2535021Mark
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
February 15, 2023 at 11:35 pm #2535033Fernando 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
February 15, 2023 at 11:41 pm #2535037Mark
No worries. Details below 🙂
February 16, 2023 at 12:00 am #2535049Fernando 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?
February 16, 2023 at 12:12 am #2535062Mark
I believe that Yoast will be doing that (totally disabling those archives). I do not want the author archives being enabled at all
-
AuthorPosts
- You must be logged in to reply to this topic.