SOLVED: Link to posts' author page is not working

Bricks Version: 1.5.5
Browser: Chrome 90
OS: macOS / Windows / Linux / etc.
URL: Provide when necessary

Hi!

I have a section for the post’s author on my single post. I want a dynamic data tag that links to the author’s page (not the author’s website). But I don’t see such an option from the dropdown list.

I also tried User ID. In the editor mode, it says it would render as mydomain.com/author/jornes(it’s what I wanted), but it was not doing the same on the front end. It was still pointing to mydomain.com/author

I assume this is not available(or not working correctly). So, I had to use a custom solution to achieve this for the time being.

I wish Bricks could add this(or fix it) so we can avoid such unnecessary tasks. This is good for new(or regular) users.

Any feedback is welcome.

2 Likes

I’ve tested {wp_user_id} and it works on my site:
slika

And on the frontend it works:

I don’t know why it doesn’t work on your site. But thanks for this, I actually didn’t know that wp_user_id renders a link to author page :sweat_smile:

1 Like

@matejmohar
Thanks for checking it out!

It’s great that works for you.

I’m not sure why it didn’t work for me. haha!
Not sure if it’s because all posts are only by one author. Not sure if it works when there are more than one author?

I just found out today. :sweat_smile:

Hi
I want to do the same for author’s single page (bio, name, author’s posts and etc).
How should i do that?

1- we need an archive for all authors

2- when we click on an author, it should be redirected to the author’s page

It will be great if we could choose what to be shown in the link, for example user_name, custom field or user ID

Hey @Mehdimoradi

I will try to answer your queries.

  1. Create a new page with a slug /author. And create a template and assign it to this page.
  2. Try to use the user id dynamic data(main post above) to see if it works for you. Otherwise, I will provide you with my custom solution.

*by right, it should work, as Matej said it worked well for him.

2 Likes

Hi Jornes,
Try this:

{site_url}/author/{echo:get_the_author()}

get_the_author is a WordPress function that retrieves the public author name. Does that work for you?

Best regards,
timmse

1 Like

Hi! @timmse
Yes. This way worked for me. Thank you!!

Just wondering why the {wp_user_id} worked for Matej but didn’t work for me.

I have no idea, {wp_user_id} doesn’t make any sense since user and author are two different things :thinking:

1 Like

Alright. Thanks again! Stefan.

But it would be good if this is achievable with dynamic data(from the dropdown). Many users will ask about it.

1 Like

Thanks guys, yes it’s so necessary to be available as a dynamic tag in bricks

Found this thread with the same challenge. Wanted to drop what I used as solution: