Skip Navigation

[Resolved] Making Custom Author Fields Show Up on Author Profile Pages etc

This thread is resolved. Here is a description of the problem and solution.

Problem:
Making Custom Author Fields Show Up on Author Profile Pages etc

Solution:
To get the currently displayed author ID of author profile page, you will require to write a custom shortcode that returns the current author profile ID.

You can find the proposed solution in this case with the following reply:
https://toolset.com/forums/topic/making-custom-author-fields-show-up-on-author-profile-pages-etc/#post-1787391

Relevant Documentation:
=> https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#vf-154505

This support ticket is created 3 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 3 replies, has 2 voices.

Last updated by liatG 3 years, 7 months ago.

Assisted by: Minesh.

Author
Posts
#1780831

I’m trying to get my custom user fields to appear on the author’s profile page, with no success. Example page:
hidden link
Author page layout link: hidden link
I would also like to get the Author nickname to show up as the Yoast page title and I am confused about how to do that too.

Here is a Loom video detailing the issue:
hidden link

#1781463

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

First of all, I can see you are using the Layouts plugin and Layout plugin is under maintenance mode as we are not going to add any new feature to it as we are focusing more on blocks but we will keep supporting Layouts.

I am not sure yet how exactly you created the author template. Can you please share problem URL and access details.

As I understand - you have author pages and you want to display the specific author info on associated author page rather loggedin user information - correct?

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#1787391

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

You have two ways to display the user field for your author pages.

To get the currently displayed author ID, I've adjusted the shortcode as given under to the "Custom Code" section of Toolset:

function get_author_id_in_archive_func($atts) {
  $author = get_user_by( 'slug', get_query_var( 'author_name' ) );
  return  $author->ID;
  }
add_shortcode("get-author-id-in-archive", "get_author_id_in_archive_func");

Use Types shrotcode that display the usermeta and pass the current author ID using the shortcode: [get-author-id-in-archive]
For example:

[types usermeta='ravelry' title='Ravelry' user_id='[get-author-id-in-archive]'][/types]

OR, use the [wpv-user] shortcode.
=> https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#vf-154505
For example:

[wpv-user field='wpcf-ravelry' id="[get-author-id-in-archive]"]<br>

You can use now the shortcode whatever fits into your requirement.

#1787711

Thank you for this easy fix!! Now the information is showing up correctly.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.